Class: Prow::Page

Inherits:
Struct
  • Object
show all
Defined in:
lib/prow/page.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#config_arrayObject

Returns the value of attribute config_array

Returns:

  • (Object)

    the current value of config_array



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

def config_array
  @config_array
end

Instance Method Details

#configObject



7
8
9
# File 'lib/prow/page.rb', line 7

def config
  config_array.last
end

#dataObject



15
16
17
# File 'lib/prow/page.rb', line 15

def data
  config['data'] || {}
end

#file_nameObject



3
4
5
# File 'lib/prow/page.rb', line 3

def file_name
  config_array.first
end

#layoutObject



11
12
13
# File 'lib/prow/page.rb', line 11

def layout
  config['layout'] || 'default'
end

#nameObject



19
20
21
# File 'lib/prow/page.rb', line 19

def name
  file_name.split('.').first
end