Class: Bismas::CLI::XML
Constant Summary
collapse
- TYPES =
%w[bismas solr]
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Bismas::CLI
#execute_options, #input_options, #require_gem, #type_option, #unsupported_type
Class Method Details
.defaults ⇒ Object
35
36
37
|
# File 'lib/bismas/cli/xml.rb', line 35
def self.defaults
super.merge(type: TYPES.first)
end
|
Instance Method Details
#run(arguments) ⇒ Object
39
40
41
42
43
44
45
46
47
|
# File 'lib/bismas/cli/xml.rb', line 39
def run(arguments)
quit unless arguments.empty?
if TYPES.include?(type = options[:type])
Bismas.to_xml(options, &method(:quit))
else
unsupported_type(type)
end
end
|