Class: YOWL::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/yowl/options.rb

Overview

Utility class representing all specified command line options

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOptions

Returns a new instance of Options.



18
19
20
21
22
23
24
25
26
# File 'lib/yowl/options.rb', line 18

def initialize()
  @verbose = false
  @quiet = false
  @ontology_file_names = []
  @output_dir = Dir.pwd()
  @template_dirs = []
  @templates = Hash.new
  @noVann = false
end

Instance Attribute Details

#noVannObject

Returns the value of attribute noVann.



10
11
12
# File 'lib/yowl/options.rb', line 10

def noVann
  @noVann
end

#ontology_file_namesObject

Returns the value of attribute ontology_file_names.



7
8
9
# File 'lib/yowl/options.rb', line 7

def ontology_file_names
  @ontology_file_names
end

#output_dirObject

Returns the value of attribute output_dir.



8
9
10
# File 'lib/yowl/options.rb', line 8

def output_dir
  @output_dir
end

#quietObject

Returns the value of attribute quiet.



15
16
17
# File 'lib/yowl/options.rb', line 15

def quiet
  @quiet
end

#template_dirsObject

Returns the value of attribute template_dirs.



9
10
11
# File 'lib/yowl/options.rb', line 9

def template_dirs
  @template_dirs
end

#templatesObject (readonly)

Returns the value of attribute templates.



12
13
14
# File 'lib/yowl/options.rb', line 12

def templates
  @templates
end

#verboseObject

Returns the value of attribute verbose.



14
15
16
# File 'lib/yowl/options.rb', line 14

def verbose
  @verbose
end

Instance Method Details

#validateObject



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/yowl/options.rb', line 28

def validate()
  if not @quiet
    puts "Output will be generated in this directory: #{output_dir.to_s}"
  end
  if ! validate_ontology_file_names()
    return false
  end
  if ! validate_template_dirs()
    return false
  end
  if ! validate_templates()
    return false
  end
  return true
end