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

Returns a new instance of AttributeReflection.



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

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

Instance Attribute Details

#appearanceObject

Returns the value of attribute appearance.



3
4
5
# File 'lib/recline/attribute_reflection.rb', line 3

def appearance
  @appearance
end

Instance Method Details

#primary_key?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/recline/attribute_reflection.rb', line 10

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