Class: Recline::AttributeReflection

Inherits:
GraphQL::Rails::ActiveReflection::AttributeReflection
  • Object
show all
Defined in:
lib/recline/attribute_reflection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(field, klass, schema) ⇒ AttributeReflection



7
8
9
10
# File 'lib/recline/attribute_reflection.rb', line 7

def initialize(field, klass, schema)
  super
  @appearance = Recline.appearance_for(field, klass, @name)
end

Instance Attribute Details

#appearanceObject

Returns the value of attribute appearance.



5
6
7
# File 'lib/recline/attribute_reflection.rb', line 5

def appearance
  @appearance
end

Instance Method Details

#primary_key?Boolean



12
13
14
# File 'lib/recline/attribute_reflection.rb', line 12

def primary_key?
  @klass.primary_key == @name
end