Class: Gizmo::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/gizmo/models/context.rb

Overview

Provides context when performing an operation (i.e. find_all, find)

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#callbackObject

Returns the value of attribute callback.



5
6
7
# File 'lib/gizmo/models/context.rb', line 5

def callback
  @callback
end

#formatObject

Returns the value of attribute format.



5
6
7
# File 'lib/gizmo/models/context.rb', line 5

def format
  @format
end

#gizmoObject

Returns the value of attribute gizmo.



5
6
7
# File 'lib/gizmo/models/context.rb', line 5

def gizmo
  @gizmo
end