Class: JSONAPI::Realizer::Resource::Attribute

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
lib/jsonapi/realizer/resource/attribute.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**keyword_arguments) ⇒ Attribute

Returns a new instance of Attribute.



17
18
19
20
21
# File 'lib/jsonapi/realizer/resource/attribute.rb', line 17

def initialize(**keyword_arguments)
  super(**keyword_arguments)

  validate!
end

Instance Attribute Details

#asObject

Returns the value of attribute as.



11
12
13
# File 'lib/jsonapi/realizer/resource/attribute.rb', line 11

def as
  @as
end

#nameObject

Returns the value of attribute name.



10
11
12
# File 'lib/jsonapi/realizer/resource/attribute.rb', line 10

def name
  @name
end

#ownerObject

Returns the value of attribute owner.



9
10
11
# File 'lib/jsonapi/realizer/resource/attribute.rb', line 9

def owner
  @owner
end