Class: ActiveShepherd::QueryMethod

Inherits:
Method
  • Object
show all
Defined in:
lib/active_shepherd/method.rb

Instance Attribute Summary collapse

Attributes inherited from Method

#aggregate, #associations, #attributes

Instance Method Summary collapse

Methods inherited from Method

inherited, #recurse, #traverse!

Constructor Details

#initialize(*args) ⇒ QueryMethod

Returns a new instance of QueryMethod.



40
41
42
43
# File 'lib/active_shepherd/method.rb', line 40

def initialize(*args)
  super
  @query = {}
end

Instance Attribute Details

#queryObject (readonly)

Returns the value of attribute query.



38
39
40
# File 'lib/active_shepherd/method.rb', line 38

def query
  @query
end

Instance Method Details

#setupObject



45
46
47
# File 'lib/active_shepherd/method.rb', line 45

def setup
  @associations = aggregate.traversable_associations
end