Class: Press::Settings
- Inherits:
-
Object
- Object
- Press::Settings
- Defined in:
- lib/source_press/press.rb
Overview
Defines settings required by the compiler. Settings are loaded from a .press.yml config file.
Each user setting is evaluated and errors are handled beforehand so the compiler only receives valid input
Instance Attribute Summary collapse
-
#ext ⇒ Object
Returns the value of attribute ext.
-
#file_order ⇒ Object
Returns the value of attribute file_order.
-
#import_kwords ⇒ Object
Returns the value of attribute import_kwords.
-
#output ⇒ Object
Returns the value of attribute output.
-
#ovr_output ⇒ Object
Returns the value of attribute ovr_output.
Instance Method Summary collapse
-
#initialize(file) ⇒ Settings
constructor
A new instance of Settings.
Constructor Details
#initialize(file) ⇒ Settings
19 20 21 22 23 24 25 26 |
# File 'lib/source_press/press.rb', line 19 def initialize(file) self.file_order = [] paths = load(file) error_check(paths) # No output file provided self.output = "out" << ext if output.nil? || output.empty? end |
Instance Attribute Details
#ext ⇒ Object
Returns the value of attribute ext.
13 14 15 |
# File 'lib/source_press/press.rb', line 13 def ext @ext end |
#file_order ⇒ Object
Returns the value of attribute file_order.
13 14 15 |
# File 'lib/source_press/press.rb', line 13 def file_order @file_order end |
#import_kwords ⇒ Object
Returns the value of attribute import_kwords.
13 14 15 |
# File 'lib/source_press/press.rb', line 13 def import_kwords @import_kwords end |
#output ⇒ Object
Returns the value of attribute output.
13 14 15 |
# File 'lib/source_press/press.rb', line 13 def output @output end |
#ovr_output ⇒ Object
Returns the value of attribute ovr_output.
13 14 15 |
# File 'lib/source_press/press.rb', line 13 def ovr_output @ovr_output end |