Class: AttributeDefinition
- Inherits:
-
RestObject
- Object
- RestObject
- AttributeDefinition
- Defined in:
- lib/rally_rest_api/attribute_definition.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from RestObject
Instance Method Summary collapse
- #allowed_values ⇒ Object
-
#body ⇒ Object
return the XML of the resource.
-
#initialize(rally_rest, values) ⇒ AttributeDefinition
constructor
A new instance of AttributeDefinition.
-
#name ⇒ Object
The name of the object, without having to read the entire body.
-
#ref ⇒ Object
the resource’s URI.
-
#type ⇒ Object
The type of the underlying resource.
Methods inherited from RestObject
#<=>, #==, #delete, #elements, #eql?, #hash, #marshal_dump, #marshal_load, #method_missing, #oid, #parse_document, #refresh, #save!, #to_hash, #type=, #type_as_symbol, #typedef, #underscore, #update
Constructor Details
#initialize(rally_rest, values) ⇒ AttributeDefinition
Returns a new instance of AttributeDefinition.
5 6 7 8 |
# File 'lib/rally_rest_api/attribute_definition.rb', line 5 def initialize(rally_rest, values) super(rally_rest) @elements = values end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RestObject
Instance Method Details
#allowed_values ⇒ Object
30 31 32 |
# File 'lib/rally_rest_api/attribute_definition.rb', line 30 def allowed_values self.elements[:allowed_values].map {|e| e[:string_value] } end |
#body ⇒ Object
return the XML of the resource
11 12 13 |
# File 'lib/rally_rest_api/attribute_definition.rb', line 11 def body nil end |
#name ⇒ Object
The name of the object, without having to read the entire body
21 22 23 |
# File 'lib/rally_rest_api/attribute_definition.rb', line 21 def name @elements[:name] end |
#ref ⇒ Object
the resource’s URI
16 17 18 |
# File 'lib/rally_rest_api/attribute_definition.rb', line 16 def ref nil end |
#type ⇒ Object
The type of the underlying resource
26 27 28 |
# File 'lib/rally_rest_api/attribute_definition.rb', line 26 def type "AttributeDefinition" end |