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
30 31 32 |
# File 'lib/relaton/cli/command.rb', line 30 def concatenate(source_dir, outfile) Relaton::Cli::RelatonFile.concatenate(source_dir, outfile, ) end |
#extract(source_dir, outdir) ⇒ Object
22 23 24 |
# File 'lib/relaton/cli/command.rb', line 22 def extract(source_dir, outdir) Relaton::Cli::RelatonFile.extract(source_dir, outdir, ) end |
#fetch(code) ⇒ Object
13 14 15 16 17 |
# File 'lib/relaton/cli/command.rb', line 13 def fetch(code) Relaton::Cli.relaton io = IO.new(STDOUT.fcntl(::Fcntl::F_DUPFD), mode: 'w:UTF-8') io.puts(fetch_document(code, ) || ) end |
#split(source, outdir) ⇒ Object
37 38 39 |
# File 'lib/relaton/cli/command.rb', line 37 def split(source, outdir) Relaton::Cli::RelatonFile.split(source, outdir, ) end |
#xml2html(file, style = nil, template = nil) ⇒ Object
68 69 70 |
# File 'lib/relaton/cli/command.rb', line 68 def xml2html(file, style = nil, template = nil) Relaton::Cli::XMLConvertor.to_html(file, style, template) end |
#xml2yaml(filename) ⇒ Object
59 60 61 |
# File 'lib/relaton/cli/command.rb', line 59 def xml2yaml(filename) Relaton::Cli::XMLConvertor.to_yaml(filename, ) end |
#yaml2html(file, style = nil, template = nil) ⇒ Object
77 78 79 |
# File 'lib/relaton/cli/command.rb', line 77 def yaml2html(file, style = nil, template = nil) Relaton::Cli::YAMLConvertor.to_html(file, style, template) end |
#yaml2xml(filename) ⇒ Object
48 49 50 |
# File 'lib/relaton/cli/command.rb', line 48 def yaml2xml(filename) Relaton::Cli::YAMLConvertor.to_xml(filename, ) end |