Class: Proton::Layout

Inherits:
Page
  • Object
show all
Defined in:
lib/proton/layout.rb

Direct Known Subclasses

Partial

Instance Attribute Summary collapse

Attributes inherited from Page

#file, #project

Class Method Summary collapse

Methods inherited from Page

#<=>, #==, #breadcrumbs, #children, #content, #default_ext, #depth, #exists?, #filepath, get_type, #html?, #index?, #initialize, #inspect, #layout, #layout?, #markup, #meta, #method_missing, #mime_type, #next, #parent, #parent?, #path, #position, #root?, #siblings, #tilt, #tilt?, #tilt_engine, #tilt_engine_name, #title, #to_html, #valid?, #write

Methods included from Cacheable

cache, #cache_method, disable!, enable!, enabled?

Constructor Details

This class inherits a constructor from Proton::Page

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Proton::Page

Instance Attribute Details

#pageObject

Returns the value of attribute page.



3
4
5
# File 'lib/proton/layout.rb', line 3

def page
  @page
end

Class Method Details

.[](id, page) ⇒ Object



5
6
7
8
9
# File 'lib/proton/layout.rb', line 5

def self.[](id, page)
  object = super(id, page.project)
  object.page = page  if object
  object
end