Class: Gluttonberg::PageDescription::Section

Inherits:
Object
  • Object
show all
Defined in:
lib/gluttonberg/page_description.rb

Overview

This class is used to define the sections of content in a page description. This class should never be instantiated direction, instead sections should be declared in the description DSL.

Instance Method Summary collapse

Constructor Details

#initialize(name, pos) ⇒ Section

Returns a new instance of Section.



235
236
237
238
# File 'lib/gluttonberg/page_description.rb', line 235

def initialize(name , pos)
  @options = {:name => name, :limit => 1 , :position => pos}
  @custom_config = {}
end

Instance Method Details

#[](opt) ⇒ Object

Returns the value for the specified option — name, description etc.



249
250
251
# File 'lib/gluttonberg/page_description.rb', line 249

def [](opt)
  @options[opt]
end