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



31
32
33
# File 'lib/relaton/cli/command.rb', line 31

def concatenate(source_dir, outfile)
  Relaton::Cli::RelatonFile.concatenate(source_dir, outfile, options)
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, options)
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, options) || supported_type_message)
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, options)
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, options)
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, options)
end

#yaml2xmlnew(filename) ⇒ Object



60
61
62
# File 'lib/relaton/cli/command.rb', line 60

def yaml2xmlnew(filename)
  Relaton::Cli::YAMLConvertorNew.to_xml(filename, options)
end