Class: Bashly::LibrarySourceConfig
- Inherits:
-
Object
- Object
- Bashly::LibrarySourceConfig
- Includes:
- ValidationHelpers
- Defined in:
- lib/bashly/library_source_config.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(path) ⇒ LibrarySourceConfig
constructor
A new instance of LibrarySourceConfig.
- #validate ⇒ Object
- #validated_data ⇒ Object
Constructor Details
#initialize(path) ⇒ LibrarySourceConfig
Returns a new instance of LibrarySourceConfig.
7 8 9 |
# File 'lib/bashly/library_source_config.rb', line 7 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/bashly/library_source_config.rb', line 5 def path @path end |
Instance Method Details
#data ⇒ Object
11 12 13 |
# File 'lib/bashly/library_source_config.rb', line 11 def data @data ||= YAML.load_file path end |
#validate ⇒ Object
20 21 22 |
# File 'lib/bashly/library_source_config.rb', line 20 def validate assert_root path, data end |
#validated_data ⇒ Object
15 16 17 18 |
# File 'lib/bashly/library_source_config.rb', line 15 def validated_data validate data end |