Class: Prow::PageConfigs
- Inherits:
-
Struct
- Object
- Struct
- Prow::PageConfigs
- Extended by:
- Forwardable
- Defined in:
- lib/prow/page_configs.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path
2 3 4 |
# File 'lib/prow/page_configs.rb', line 2 def path @path end |
Instance Method Details
#collection ⇒ Object
13 14 15 16 17 |
# File 'lib/prow/page_configs.rb', line 13 def collection @collection ||= pages_array.map do |config| Page.new(config) end end |
#load ⇒ Object
5 6 7 |
# File 'lib/prow/page_configs.rb', line 5 def load JSON.parse(File.read(path)) end |
#pages_array ⇒ Object
9 10 11 |
# File 'lib/prow/page_configs.rb', line 9 def pages_array load['pages'] || [] end |