Class: Blockpile::Base
- Inherits:
-
Object
show all
- Defined in:
- lib/blockpile/base.rb
Instance Method Summary
collapse
Constructor Details
#initialize(helper, *args, &block) ⇒ Base
Returns a new instance of Base.
3
4
5
6
7
|
# File 'lib/blockpile/base.rb', line 3
def initialize(helper, *args, &block)
@helper = helper
build *args
@content = capture(self, &block) if block_given?
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object
28
29
30
|
# File 'lib/blockpile/base.rb', line 28
def method_missing(*args, &block)
@helper.send(*args, &block)
end
|
Instance Method Details
#build ⇒ Object
17
18
19
|
# File 'lib/blockpile/base.rb', line 17
def build
end
|
#get_content ⇒ Object
13
14
15
|
# File 'lib/blockpile/base.rb', line 13
def get_content
@content
end
|
#to_html ⇒ Object
9
10
11
|
# File 'lib/blockpile/base.rb', line 9
def to_html
render_template
end
|