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.



56
57
58
59
# File 'lib/hq/graphql/object_association.rb', line 56

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

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



54
55
56
# File 'lib/hq/graphql/object_association.rb', line 54

def block
  @block
end

#nameObject (readonly)

Returns the value of attribute name.



54
55
56
# File 'lib/hq/graphql/object_association.rb', line 54

def name
  @name
end

Instance Method Details

#reflection(model_klass) ⇒ Object



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

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