Class: Gizmo::Context
- Inherits:
-
Object
- Object
- Gizmo::Context
- Defined in:
- lib/gizmo/models/context.rb
Overview
Provides context when performing an operation (i.e. find_all, find)
Instance Attribute Summary collapse
-
#callback ⇒ Object
Returns the value of attribute callback.
-
#format ⇒ Object
Returns the value of attribute format.
-
#gizmo ⇒ Object
Returns the value of attribute gizmo.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Context
constructor
TODO document options.
Constructor Details
#initialize(attrs = {}) ⇒ Context
TODO document options
8 9 10 11 12 13 |
# File 'lib/gizmo/models/context.rb', line 8 def initialize(attrs={}) attrs.each do |key, val| setter = :"#{key}=" send setter, val if respond_to?(setter) end end |
Instance Attribute Details
#callback ⇒ Object
Returns the value of attribute callback.
5 6 7 |
# File 'lib/gizmo/models/context.rb', line 5 def callback @callback end |
#format ⇒ Object
Returns the value of attribute format.
5 6 7 |
# File 'lib/gizmo/models/context.rb', line 5 def format @format end |
#gizmo ⇒ Object
Returns the value of attribute gizmo.
5 6 7 |
# File 'lib/gizmo/models/context.rb', line 5 def gizmo @gizmo end |