Class: Relaton::Cli::Command

Inherits:
Thor
  • Object
show all
Defined in:
lib/relaton/cli/command.rb

Instance Method Summary collapse

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, options)
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, options)
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, options) || supported_type_message)
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, options)
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, options)
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, options)
end