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



24
25
26
# File 'lib/relaton/cli/command.rb', line 24

def extract(source_dir, outdir)
  Relaton::Cli::RelatonFile.extract(source_dir, outdir, options)
end

#fetch(code) ⇒ Object



15
16
17
18
19
# File 'lib/relaton/cli/command.rb', line 15

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



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



94
95
96
# File 'lib/relaton/cli/command.rb', line 94

def xml2html(file, style = nil, template = nil)
  Relaton::Cli::XMLConvertor.to_html(file, style, template)
end

#xml2yaml(filename) ⇒ Object



74
75
76
# File 'lib/relaton/cli/command.rb', line 74

def xml2yaml(filename)
  Relaton::Cli::XMLConvertor.to_yaml(filename, options)
end

#xml2yamlnew(filename) ⇒ Object



85
86
87
# File 'lib/relaton/cli/command.rb', line 85

def xml2yamlnew(filename)
  Relaton::Cli::XMLConvertorNew.to_yaml(filename, options)
end

#yaml2html(file, style = nil, template = nil) ⇒ Object



103
104
105
# File 'lib/relaton/cli/command.rb', line 103

def yaml2html(file, style = nil, template = nil)
  Relaton::Cli::YAMLConvertor.to_html(file, style, template)
end

#yaml2htmlnew(file, style = nil, template = nil) ⇒ Object



112
113
114
# File 'lib/relaton/cli/command.rb', line 112

def yaml2htmlnew(file, style = nil, template = nil)
  Relaton::Cli::YAMLConvertorNew.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

#yaml2xmlnew(filename) ⇒ Object



63
64
65
# File 'lib/relaton/cli/command.rb', line 63

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