Class: Prow::PageConfigs

Inherits:
Struct
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/prow/page_configs.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



2
3
4
# File 'lib/prow/page_configs.rb', line 2

def path
  @path
end

Instance Method Details

#collectionObject



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

#loadObject



5
6
7
# File 'lib/prow/page_configs.rb', line 5

def load
  JSON.parse(File.read(path))
end

#pages_arrayObject



9
10
11
# File 'lib/prow/page_configs.rb', line 9

def pages_array
  load['pages'] || []
end