Class: Card::Bootstrap

Inherits:
Object
  • Object
show all
Extended by:
ComponentLoader
Includes:
Delegate
Defined in:
lib/card/bootstrap.rb,
lib/card/bootstrap/content.rb,
lib/card/bootstrap/delegate.rb,
lib/card/bootstrap/component.rb,
lib/card/bootstrap/basic_tags.rb,
lib/card/bootstrap/tag_method.rb,
lib/card/bootstrap/old_component.rb,
lib/card/bootstrap/component/form.rb,
lib/card/bootstrap/component/panel.rb,
lib/card/bootstrap/component_klass.rb,
lib/card/bootstrap/component/layout.rb,
lib/card/bootstrap/component_loader.rb,
lib/card/bootstrap/component/carousel.rb,
lib/card/bootstrap/component/horizontal_form.rb

Overview

base class for bootstrap component support

Defined Under Namespace

Modules: BasicTags, ComponentKlass, ComponentLoader, Content, Delegate Classes: Component, OldComponent, TagMethod

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ComponentLoader

components, include_component, load_components, to_const

Methods included from Delegate

#method_missing, #respond_to_missing?

Constructor Details

#initialize(context = nil) ⇒ Bootstrap

Returns a new instance of Bootstrap.



10
11
12
# File 'lib/card/bootstrap.rb', line 10

def initialize context=nil
  @context = context
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Card::Bootstrap::Delegate

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



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

def context
  @context
end

Instance Method Details

#renderObject



14
15
16
# File 'lib/card/bootstrap.rb', line 14

def render(...)
  instance_exec(...)
end