Sha256: 38e613f4c5babdc5ce8241909128adf16c94e9b546776ea932471acb47dd37aa

Contents?: true

Size: 581 Bytes

Versions: 10

Compression:

Stored size: 581 Bytes

Contents

require File.dirname(__FILE__) + '/rest_object'

class AttributeDefinition < RestObject # :nodoc:

  def initialize(rally_rest, values)
    super(rally_rest)
    @elements = values
  end

  # return the XML of the resource
  def body
    nil
  end

  # the resource's URI
  def ref
    nil
  end

  # The name of the object, without having to read the entire body
  def name
    @elements[:name]
  end

  # The type of the underlying resource
  def type
    "AttributeDefinition"
  end

  def allowed_values
    self.elements[:allowed_values].map {|e| e[:string_value] }
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rally_rest_api-1.1.0 lib/rally_rest_api/attribute_definition.rb
rally_rest_api-1.0.6 lib/rally_rest_api/attribute_definition.rb
rally_rest_api-1.0.5 lib/rally_rest_api/attribute_definition.rb
rally_rest_api-1.0.4 lib/rally_rest_api/attribute_definition.rb
rally_rest_api-1.0.3 lib/rally_rest_api/attribute_definition.rb
rally_rest_api-1.0.2 lib/rally_rest_api/attribute_definition.rb
rally_rest_api-1.0.1 lib/rally_rest_api/attribute_definition.rb
rally_rest_api-0.9.0 lib/rally_rest_api/attribute_definition.rb
rally_rest_api-1.0.0 lib/rally_rest_api/attribute_definition.rb
rally_rest_api-0.8.0 lib/rally_rest_api/attribute_definition.rb