Module: Teacup::ControllerClass
- Defined in:
- lib/teacup/teacup_controller.rb
Instance Attribute Summary collapse
-
#layout_definition ⇒ Object
readonly
Returns the value of attribute layout_definition.
Instance Method Summary collapse
-
#layout(stylename = nil, properties = {}, &block) ⇒ Object
Define the layout of a controller’s view.
Instance Attribute Details
#layout_definition ⇒ Object (readonly)
Returns the value of attribute layout_definition.
7 8 9 |
# File 'lib/teacup/teacup_controller.rb', line 7 def layout_definition @layout_definition end |
Instance Method Details
#layout(stylename = nil, properties = {}, &block) ⇒ Object
Define the layout of a controller’s view.
This function is analogous to Teacup::Layout#layout, though it is designed so you can create an entire layout in a declarative manner in your controller.
The hope is that this declarativeness will allow us to automatically deal with common iOS programming tasks (like releasing views when low-memory conditions occur) for you. This is still not implemented though.
42 43 44 |
# File 'lib/teacup/teacup_controller.rb', line 42 def layout(stylename=nil, properties={}, &block) @layout_definition = [stylename, properties, block] end |