Class: YOWL::Options
- Inherits:
-
Object
- Object
- YOWL::Options
- Defined in:
- lib/yowl/options.rb
Overview
Utility class representing all specified command line options
Instance Attribute Summary collapse
-
#noVann ⇒ Object
Returns the value of attribute noVann.
-
#ontology_file_names ⇒ Object
Returns the value of attribute ontology_file_names.
-
#output_dir ⇒ Object
Returns the value of attribute output_dir.
-
#quiet ⇒ Object
Returns the value of attribute quiet.
-
#template_dirs ⇒ Object
Returns the value of attribute template_dirs.
-
#templates ⇒ Object
readonly
Returns the value of attribute templates.
-
#verbose ⇒ Object
Returns the value of attribute verbose.
Instance Method Summary collapse
-
#initialize ⇒ Options
constructor
A new instance of Options.
- #validate ⇒ Object
Constructor Details
#initialize ⇒ Options
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
#noVann ⇒ Object
Returns the value of attribute noVann.
10 11 12 |
# File 'lib/yowl/options.rb', line 10 def noVann @noVann end |
#ontology_file_names ⇒ Object
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_dir ⇒ Object
Returns the value of attribute output_dir.
8 9 10 |
# File 'lib/yowl/options.rb', line 8 def output_dir @output_dir end |
#quiet ⇒ Object
Returns the value of attribute quiet.
15 16 17 |
# File 'lib/yowl/options.rb', line 15 def quiet @quiet end |
#template_dirs ⇒ Object
Returns the value of attribute template_dirs.
9 10 11 |
# File 'lib/yowl/options.rb', line 9 def template_dirs @template_dirs end |
#templates ⇒ Object (readonly)
Returns the value of attribute templates.
12 13 14 |
# File 'lib/yowl/options.rb', line 12 def templates @templates end |
#verbose ⇒ Object
Returns the value of attribute verbose.
14 15 16 |
# File 'lib/yowl/options.rb', line 14 def verbose @verbose end |
Instance Method Details
#validate ⇒ Object
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 |