Skip to content

Commit 86b8304

Browse files
committed
Add CLI options.
1 parent 4418340 commit 86b8304

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

lib/json/ld/writer.rb

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,36 @@ def self.options
9090
control: :url2,
9191
on: ["--context CONTEXT"],
9292
description: "Context to use when compacting.") {|arg| RDF::URI(arg)},
93+
RDF::CLI::Option.new(
94+
symbol: :embed,
95+
datatype: %w(@always @last @never),
96+
control: :select,
97+
on: ["--embed EMBED"],
98+
description: "How to embed matched objects (@last).") {|arg| RDF::URI(arg)},
99+
RDF::CLI::Option.new(
100+
symbol: :explicit,
101+
datatype: TrueClass,
102+
control: :checkbox,
103+
on: ["--explicit"],
104+
description: "Only include explicitly declared properties in output (false)") {|arg| RDF::URI(arg)},
105+
RDF::CLI::Option.new(
106+
symbol: :omitDefault,
107+
datatype: TrueClass,
108+
control: :checkbox,
109+
on: ["--omitDefault"],
110+
description: "Omit missing properties from output (false)") {|arg| RDF::URI(arg)},
93111
RDF::CLI::Option.new(
94112
symbol: :processing_mode,
95113
datatype: %w(json-ld-1.0 json-ld-1.1),
96114
control: :radio,
97115
on: ["--processingMode MODE", %w(json-ld-1.0 json-ld-1.1)],
98116
description: "Set Processing Mode (json-ld-1.0 or json-ld-1.1)"),
117+
RDF::CLI::Option.new(
118+
symbol: :requireAll,
119+
datatype: TrueClass,
120+
control: :checkbox,
121+
on: ["--requireAll"],
122+
description: "Require all properties to match (true)") {|arg| RDF::URI(arg)},
99123
RDF::CLI::Option.new(
100124
symbol: :stream,
101125
datatype: TrueClass,

0 commit comments

Comments
 (0)