Class: HQ::GraphQL::ObjectAssociation::UpdatedReflection

Inherits:
Object
  • Object
show all
Defined in:
lib/hq/graphql/object_association.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, block) ⇒ UpdatedReflection

Returns a new instance of UpdatedReflection.



61
62
63
64
# File 'lib/hq/graphql/object_association.rb', line 61

def initialize(name, block)
  @name = name
  @block = block
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



59
60
61
# File 'lib/hq/graphql/object_association.rb', line 59

def block
  @block
end

#nameObject (readonly)

Returns the value of attribute name.



59
60
61
# File 'lib/hq/graphql/object_association.rb', line 59

def name
  @name
end

Instance Method Details

#reflection(model_klass) ⇒ Object



66
67
68
# File 'lib/hq/graphql/object_association.rb', line 66

def reflection(model_klass)
  model_klass.reflect_on_association(name)
end