Class: Spread2RDF::Cli

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/spread2rdf/cli.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#mapping_schemaObject

Returns the value of attribute mapping_schema.



8
9
10
# File 'lib/spread2rdf/cli.rb', line 8

def mapping_schema
  @mapping_schema
end

Instance Method Details

#compile?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/spread2rdf/cli.rb', line 38

def compile?
  !!@options[:compile]
end

#run(options = {}) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/spread2rdf/cli.rb', line 10

def run(options = {})
  @running = true
  init(options)
  parse_command_line!
  case
    when compile? then compile(@mapping_schema)
    else convert
  end
  self
rescue => e
  if Spread2RDF.debug_mode
    raise e
  else
    abort e.to_s
  end
end

#running?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/spread2rdf/cli.rb', line 34

def running?
  @running
end