Class: Taeval::Hadolint::Config
- Inherits:
-
Object
- Object
- Taeval::Hadolint::Config
- Includes:
- FileHelper
- Defined in:
- lib/taeval/hadolint/config.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#solutions ⇒ Object
readonly
Returns the value of attribute solutions.
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 18 19 |
# File 'lib/taeval/hadolint/config.rb', line 9 def initialize(conf_h) @path = path_of(conf_h.fetch('path', '')) if !File.exist?(@path) raise "Path of hadolint (#{@path}) does not exist." end @solutions = path_of(conf_h.dig('solution', 'path')) if !File.exist?(@solutions) raise "Path of solutions (#{@solutions}) does not exist." end end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
7 8 9 |
# File 'lib/taeval/hadolint/config.rb', line 7 def path @path end |
#solutions ⇒ Object (readonly)
Returns the value of attribute solutions.
7 8 9 |
# File 'lib/taeval/hadolint/config.rb', line 7 def solutions @solutions end |