Class: Seory::Runtime
- Inherits:
-
Object
- Object
- Seory::Runtime
- Defined in:
- lib/seory/runtime.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#page_contents ⇒ Object
readonly
Returns the value of attribute page_contents.
Instance Method Summary collapse
- #assigns(name) ⇒ Object
-
#initialize(page_contents, controller, fallback = nil) ⇒ Runtime
constructor
A new instance of Runtime.
- #misc(name) ⇒ Object
Constructor Details
#initialize(page_contents, controller, fallback = nil) ⇒ Runtime
Returns a new instance of Runtime.
9 10 11 12 13 14 15 |
# File 'lib/seory/runtime.rb', line 9 def initialize(page_contents, controller, fallback = nil) @page_contents = page_contents @controller = controller @fallback = fallback extend build_assign_accessor_module(@page_contents.assign_name_accessors) end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
7 8 9 |
# File 'lib/seory/runtime.rb', line 7 def controller @controller end |
#page_contents ⇒ Object (readonly)
Returns the value of attribute page_contents.
7 8 9 |
# File 'lib/seory/runtime.rb', line 7 def page_contents @page_contents end |
Instance Method Details
#assigns(name) ⇒ Object
17 18 19 |
# File 'lib/seory/runtime.rb', line 17 def assigns(name) @controller.view_assigns[name.to_s] end |
#misc(name) ⇒ Object
21 22 23 |
# File 'lib/seory/runtime.rb', line 21 def misc(name) calculate_content_for(name) end |