Class: Relaton::Cli::Command
- Inherits:
-
Thor
- Object
- Thor
- Relaton::Cli::Command
- Defined in:
- lib/relaton/cli/command.rb
Instance Method Summary collapse
- #concatenate(source_dir, outfile) ⇒ Object
- #extract(source_dir, outdir) ⇒ Object
- #fetch(code) ⇒ Object
- #split(source, outdir) ⇒ Object
- #xml2html(file, style = nil, template = nil) ⇒ Object
- #xml2yaml(filename) ⇒ Object
- #yaml2html(file, style = nil, template = nil) ⇒ Object
- #yaml2xml(filename) ⇒ Object
Instance Method Details
#concatenate(source_dir, outfile) ⇒ Object
33 34 35 |
# File 'lib/relaton/cli/command.rb', line 33 def concatenate(source_dir, outfile) Relaton::Cli::RelatonFile.concatenate(source_dir, outfile, ) end |
#extract(source_dir, outdir) ⇒ Object
23 24 25 |
# File 'lib/relaton/cli/command.rb', line 23 def extract(source_dir, outdir) Relaton::Cli::RelatonFile.extract(source_dir, outdir, ) end |
#fetch(code) ⇒ Object
14 15 16 17 18 |
# File 'lib/relaton/cli/command.rb', line 14 def fetch(code) Relaton.db io = IO.new(STDOUT.fcntl(::Fcntl::F_DUPFD), mode: 'w:UTF-8') io.puts(fetch_document(code, ) || ) end |
#split(source, outdir) ⇒ Object
41 42 43 |
# File 'lib/relaton/cli/command.rb', line 41 def split(source, outdir) Relaton::Cli::RelatonFile.split(source, outdir, ) end |
#xml2html(file, style = nil, template = nil) ⇒ Object
72 73 74 |
# File 'lib/relaton/cli/command.rb', line 72 def xml2html(file, style = nil, template = nil) Relaton::Cli::XMLConvertor.to_html(file, style, template) end |
#xml2yaml(filename) ⇒ Object
63 64 65 |
# File 'lib/relaton/cli/command.rb', line 63 def xml2yaml(filename) Relaton::Cli::XMLConvertor.to_yaml(filename, ) end |
#yaml2html(file, style = nil, template = nil) ⇒ Object
81 82 83 |
# File 'lib/relaton/cli/command.rb', line 81 def yaml2html(file, style = nil, template = nil) Relaton::Cli::YAMLConvertor.to_html(file, style, template) end |
#yaml2xml(filename) ⇒ Object
52 53 54 |
# File 'lib/relaton/cli/command.rb', line 52 def yaml2xml(filename) Relaton::Cli::YAMLConvertor.to_xml(filename, ) end |