Class: Recline::AttributeReflection
- Inherits:
-
GraphQL::Rails::ActiveReflection::AttributeReflection
- Object
- GraphQL::Rails::ActiveReflection::AttributeReflection
- Recline::AttributeReflection
- Defined in:
- lib/recline/attribute_reflection.rb
Instance Attribute Summary collapse
-
#appearance ⇒ Object
Returns the value of attribute appearance.
Instance Method Summary collapse
-
#initialize(field, klass, schema) ⇒ AttributeReflection
constructor
A new instance of AttributeReflection.
- #primary_key? ⇒ Boolean
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
#appearance ⇒ Object
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
10 11 12 |
# File 'lib/recline/attribute_reflection.rb', line 10 def primary_key? @klass.primary_key == @name end |