Module: EndView

Included in:
Bootstrap::FormGroup, Bootstrap::FormModal, Bootstrap::Modal, Bootstrap::SimpleForm, Bootstrap::Tabpanel, Form::SimpleForm, Rails::Layout
Defined in:
lib/end_view.rb,
lib/end_view/form/builder.rb,
lib/end_view/rails/layout.rb,
lib/end_view/bootstrap/modal.rb,
lib/end_view/form/simple_form.rb,
lib/end_view/bootstrap/tab_pane.rb,
lib/end_view/bootstrap/tabpanel.rb,
lib/end_view/form/record_builder.rb,
lib/end_view/bootstrap/form_group.rb,
lib/end_view/bootstrap/form_modal.rb,
lib/end_view/bootstrap/simple_form.rb,
lib/end_view/bootstrap/simple_form_modal.rb

Defined Under Namespace

Modules: Bootstrap, ClassMethods, Form, InstanceMethods, Methods, Rails

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.default_engineObject



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

def default_engine
  @default_engine ||= Tilt::HamlTemplate
end

Class Method Details

.extended(base, opts = {}) ⇒ Object



19
20
21
22
23
# File 'lib/end_view.rb', line 19

def extended(base, opts = {})
  base.extend ClassMethods
  base.compile_template(opts.merge(start: 4))
  base.extend(Methods)
end

.included(base, opts = {}) ⇒ Object



12
13
14
15
16
17
# File 'lib/end_view.rb', line 12

def included(base, opts = {})
  base.extend ClassMethods
  base.compile_template(opts.merge(start: 4))
  base.send(:include, InstanceMethods)
  base.send(:include, Methods)
end

.new(opts = {}) ⇒ Object



25
26
27
28
29
30
# File 'lib/end_view.rb', line 25

def new(opts = {})
  Module.new do
    define_singleton_method(:included) { |base| EndView.included(base, opts) }
    define_singleton_method(:extended) { |base| EndView.extended(base, opts) }
  end
end