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
- #yaml2htmlnew(file, style = nil, template = nil) ⇒ Object
- #yaml2xml(filename) ⇒ Object
- #yaml2xmlnew(filename) ⇒ Object
Instance Method Details
#concatenate(source_dir, outfile) ⇒ Object
31 32 33 |
# File 'lib/relaton/cli/command.rb', line 31 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::Cli.relaton io = IO.new(STDOUT.fcntl(::Fcntl::F_DUPFD), mode: 'w:UTF-8') io.puts(fetch_document(code, ) || ) end |
#split(source, outdir) ⇒ Object
38 39 40 |
# File 'lib/relaton/cli/command.rb', line 38 def split(source, outdir) Relaton::Cli::RelatonFile.split(source, outdir, ) end |
#xml2html(file, style = nil, template = nil) ⇒ Object
80 81 82 |
# File 'lib/relaton/cli/command.rb', line 80 def xml2html(file, style = nil, template = nil) Relaton::Cli::XMLConvertor.to_html(file, style, template) end |
#xml2yaml(filename) ⇒ Object
71 72 73 |
# File 'lib/relaton/cli/command.rb', line 71 def xml2yaml(filename) Relaton::Cli::XMLConvertor.to_yaml(filename, ) end |
#yaml2html(file, style = nil, template = nil) ⇒ Object
89 90 91 |
# File 'lib/relaton/cli/command.rb', line 89 def yaml2html(file, style = nil, template = nil) Relaton::Cli::YAMLConvertor.to_html(file, style, template) end |
#yaml2htmlnew(file, style = nil, template = nil) ⇒ Object
98 99 100 |
# File 'lib/relaton/cli/command.rb', line 98 def yaml2htmlnew(file, style = nil, template = nil) Relaton::Cli::YAMLConvertorNew.to_html(file, style, template) end |
#yaml2xml(filename) ⇒ Object
49 50 51 |
# File 'lib/relaton/cli/command.rb', line 49 def yaml2xml(filename) Relaton::Cli::YAMLConvertor.to_xml(filename, ) end |
#yaml2xmlnew(filename) ⇒ Object
60 61 62 |
# File 'lib/relaton/cli/command.rb', line 60 def yaml2xmlnew(filename) Relaton::Cli::YAMLConvertorNew.to_xml(filename, ) end |