Class: Awestruct::Context
- Defined in:
- lib/awestruct/context.rb
Instance Attribute Summary collapse
-
#page ⇒ Object
Returns the value of attribute page.
-
#site ⇒ Object
Returns the value of attribute site.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Context
constructor
A new instance of Context.
- #inspect ⇒ Object
Methods included from AStructMixin
#[], #cascade_for_nils!, extended, #key?, #method_missing, #transform_entry
Constructor Details
#initialize(hash) ⇒ Context
Returns a new instance of Context.
10 11 12 13 14 15 |
# File 'lib/awestruct/context.rb', line 10 def initialize(hash) super @page = hash[:page] @site = hash[:site] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Awestruct::AStructMixin
Instance Attribute Details
#page ⇒ Object
Returns the value of attribute page.
8 9 10 |
# File 'lib/awestruct/context.rb', line 8 def page @page end |
#site ⇒ Object
Returns the value of attribute site.
7 8 9 |
# File 'lib/awestruct/context.rb', line 7 def site @site end |
Instance Method Details
#inspect ⇒ Object
17 18 19 |
# File 'lib/awestruct/context.rb', line 17 def inspect "Awestruct::Context{:page=>#{self.page.inspect}}" end |