Class: RailsBootstrapEngine::BootstrapMarkupCollection
- Inherits:
-
Object
- Object
- RailsBootstrapEngine::BootstrapMarkupCollection
show all
- Defined in:
- lib/rails-bootstrap-engine/markup/bootstrap_markup_collection.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of BootstrapMarkupCollection.
19
20
21
22
|
# File 'lib/rails-bootstrap-engine/markup/bootstrap_markup_collection.rb', line 19
def initialize(view)
@view = view
@calls = []
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(symbol, *args, &block) ⇒ Object
24
25
26
|
# File 'lib/rails-bootstrap-engine/markup/bootstrap_markup_collection.rb', line 24
def method_missing(symbol, *args, &block)
@calls << HelperMethodCall.new(@view, symbol, args, block)
end
|
Instance Attribute Details
#calls ⇒ Object
Returns the value of attribute calls.
17
18
19
|
# File 'lib/rails-bootstrap-engine/markup/bootstrap_markup_collection.rb', line 17
def calls
@calls
end
|
#view ⇒ Object
Returns the value of attribute view.
17
18
19
|
# File 'lib/rails-bootstrap-engine/markup/bootstrap_markup_collection.rb', line 17
def view
@view
end
|
Instance Method Details
#[](x) ⇒ Object
34
35
36
|
# File 'lib/rails-bootstrap-engine/markup/bootstrap_markup_collection.rb', line 34
def [](x)
@calls[x]
end
|
#each ⇒ Object
28
29
30
31
32
|
# File 'lib/rails-bootstrap-engine/markup/bootstrap_markup_collection.rb', line 28
def each
@calls.each do |c|
yield c
end
end
|
#shift ⇒ Object
42
43
44
|
# File 'lib/rails-bootstrap-engine/markup/bootstrap_markup_collection.rb', line 42
def shift
@calls.shift
end
|
#size ⇒ Object
38
39
40
|
# File 'lib/rails-bootstrap-engine/markup/bootstrap_markup_collection.rb', line 38
def size
@calls.size
end
|