Class: OptParseValidator::OptionsFile::Base
- Inherits:
-
Object
- Object
- OptParseValidator::OptionsFile::Base
- Defined in:
- lib/opt_parse_validator/options_file/base.rb
Overview
Base class, #parse should be implemented in child classes
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(path) ⇒ Base
constructor
A new instance of Base.
-
#parse ⇒ Hash
A { key: value } hash.
Constructor Details
#initialize(path) ⇒ Base
Returns a new instance of Base.
8 9 10 |
# File 'lib/opt_parse_validator/options_file/base.rb', line 8 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/opt_parse_validator/options_file/base.rb', line 5 def path @path end |
Instance Method Details
#==(other) ⇒ Object
17 18 19 |
# File 'lib/opt_parse_validator/options_file/base.rb', line 17 def ==(other) path == other.path end |
#parse ⇒ Hash
Returns a { key: value } hash.
13 14 15 |
# File 'lib/opt_parse_validator/options_file/base.rb', line 13 def parse raise NotImplementedError end |