Class: Taeval::Unittest::Config
- Inherits:
-
Object
- Object
- Taeval::Unittest::Config
- Includes:
- FileHelper
- Defined in:
- lib/taeval/unittest/config.rb
Instance Attribute Summary collapse
-
#cmd ⇒ Object
readonly
Returns the value of attribute cmd.
-
#original ⇒ Object
readonly
Returns the value of attribute original.
-
#solutions ⇒ Object
readonly
Returns the value of attribute solutions.
-
#tool ⇒ Object
readonly
Returns the value of attribute tool.
Instance Method Summary collapse
-
#initialize(conf_h) ⇒ Config
constructor
A new instance of Config.
Methods included from FileHelper
#create, #exist?, #flatten_include!, #open, #path_of
Constructor Details
#initialize(conf_h) ⇒ Config
Returns a new instance of Config.
9 10 11 12 13 14 15 16 17 |
# File 'lib/taeval/unittest/config.rb', line 9 def initialize(conf_h) @tool = conf_h.dig('build', 'tool') @cmd = conf_h.dig('build', 'cmd') @original = path_of(conf_h.fetch('original', '')) if !File.exist?(@original) raise "Unittest: #{@original} does not exist" end @solutions = path_of(conf_h.dig('solution', 'path')) end |
Instance Attribute Details
#cmd ⇒ Object (readonly)
Returns the value of attribute cmd.
7 8 9 |
# File 'lib/taeval/unittest/config.rb', line 7 def cmd @cmd end |
#original ⇒ Object (readonly)
Returns the value of attribute original.
7 8 9 |
# File 'lib/taeval/unittest/config.rb', line 7 def original @original end |
#solutions ⇒ Object (readonly)
Returns the value of attribute solutions.
7 8 9 |
# File 'lib/taeval/unittest/config.rb', line 7 def solutions @solutions end |
#tool ⇒ Object (readonly)
Returns the value of attribute tool.
7 8 9 |
# File 'lib/taeval/unittest/config.rb', line 7 def tool @tool end |