Class: Press::Settings

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#extObject

Returns the value of attribute ext.



13
14
15
# File 'lib/source_press/press.rb', line 13

def ext
  @ext
end

#file_orderObject

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_kwordsObject

Returns the value of attribute import_kwords.



13
14
15
# File 'lib/source_press/press.rb', line 13

def import_kwords
  @import_kwords
end

#outputObject

Returns the value of attribute output.



13
14
15
# File 'lib/source_press/press.rb', line 13

def output
  @output
end

#ovr_outputObject

Returns the value of attribute ovr_output.



13
14
15
# File 'lib/source_press/press.rb', line 13

def ovr_output
  @ovr_output
end