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



33
34
35
# File 'lib/relaton/cli/command.rb', line 33

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.db
  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



41
42
43
# File 'lib/relaton/cli/command.rb', line 41

def split(source, outdir)
  Relaton::Cli::RelatonFile.split(source, outdir, options)
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, options)
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, options)
end