Class: Restful::ApiModel::Attribute

Inherits:
Object
  • Object
show all
Defined in:
lib/restful/apimodel/attribute.rb

Direct Known Subclasses

Collection, Link

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, value, extended_type) ⇒ Attribute

Returns a new instance of Attribute.



9
10
11
12
13
14
# File 'lib/restful/apimodel/attribute.rb', line 9

def initialize(name, value, extended_type)
  self.name = name
  self.value = value
  self.extended_type = extended_type
  self.type = :simple_attribute
end

Instance Attribute Details

#extended_typeObject

Returns the value of attribute extended_type.



7
8
9
# File 'lib/restful/apimodel/attribute.rb', line 7

def extended_type
  @extended_type
end

#nameObject

Returns the value of attribute name.



7
8
9
# File 'lib/restful/apimodel/attribute.rb', line 7

def name
  @name
end

#typeObject

Returns the value of attribute type.



7
8
9
# File 'lib/restful/apimodel/attribute.rb', line 7

def type
  @type
end

#valueObject

Returns the value of attribute value.



7
8
9
# File 'lib/restful/apimodel/attribute.rb', line 7

def value
  @value
end