Class: Syaso::Base
- Inherits:
-
Object
- Object
- Syaso::Base
- Defined in:
- lib/syaso/base.rb
Constant Summary collapse
- BLOCK_BUFFER =
--------------------# constants
""
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
--------------------# attributes.
Instance Method Summary collapse
-
#initialize(context) ⇒ Base
constructor
initialize method.
-
#render(content = nil, options = {}, &block) ⇒ Object
render content.
Constructor Details
#initialize(context) ⇒ Base
initialize method
23 24 25 26 |
# File 'lib/syaso/base.rb', line 23 def initialize(context) super() self.context = context end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object (private)
method missing
161 162 163 164 165 166 167 |
# File 'lib/syaso/base.rb', line 161 def method_missing(name, *args, &block) begin self.content.__send__(name, *args, &block) rescue => e super end end |
Instance Attribute Details
#content ⇒ Object
--------------------# attributes
12 13 14 |
# File 'lib/syaso/base.rb', line 12 def content @content end |
Instance Method Details
#render(content = nil, options = {}, &block) ⇒ Object
render content.
32 33 34 |
# File 'lib/syaso/base.rb', line 32 def render(content = nil, = {}, &block) self._render(content, , &block) end |