Class: Resulang::Section

Inherits:
Object
  • Object
show all
Includes:
Fields, Rendering
Defined in:
lib/resulang/section.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Rendering

#html_escape, #partial, #render_section

Methods included from Fields

included

Constructor Details

#initialize(&block) ⇒ Section

Returns a new instance of Section.



12
13
14
# File 'lib/resulang/section.rb', line 12

def initialize(&block)
  instance_eval(&block)
end

Class Method Details

.inherited(subclass) ⇒ Object



8
9
10
# File 'lib/resulang/section.rb', line 8

def self.inherited(subclass)
  Resulang::Dsl.register_section!(ActiveSupport::Inflector.underscore(subclass.name), subclass)
end

Instance Method Details

#get_bindingObject



16
17
18
# File 'lib/resulang/section.rb', line 16

def get_binding
  binding
end