Class: DataFile
- Inherits:
-
Object
- Object
- DataFile
- Defined in:
- lib/hiera_browser/data.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #initialize(args = {}) ⇒ void constructor
- #keys ⇒ Array
Constructor Details
#initialize(args = {}) ⇒ void
50 51 52 53 |
# File 'lib/hiera_browser/data.rb', line 50 def initialize(args={}) @path = args[:path] @keys = keys end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
47 48 49 |
# File 'lib/hiera_browser/data.rb', line 47 def path @path end |
Instance Method Details
#keys ⇒ Array
56 57 58 |
# File 'lib/hiera_browser/data.rb', line 56 def keys YAML.load_file(@path).keys end |