Class: Taobao::Property

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/taobao/property.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Util

#to_object

Constructor Details

#initialize(response) ⇒ Property

Returns a new instance of Property.

Parameters:

  • response (Hash)

Raises:



6
7
8
9
10
11
# File 'lib/taobao/property.rb', line 6

def initialize(response)
  @response = response
  to_object response
  @values = get_values
  raise Taobao::IncorrectProperty, 'Incorrect property data' if @name.nil?
end

Instance Attribute Details

#multiObject (readonly)

Returns the value of attribute multi.



2
3
4
# File 'lib/taobao/property.rb', line 2

def multi
  @multi
end

#mustObject (readonly)

Returns the value of attribute must.



2
3
4
# File 'lib/taobao/property.rb', line 2

def must
  @must
end

#nameObject (readonly)

Returns the value of attribute name.



2
3
4
# File 'lib/taobao/property.rb', line 2

def name
  @name
end

#pidObject (readonly)

Returns the value of attribute pid.



2
3
4
# File 'lib/taobao/property.rb', line 2

def pid
  @pid
end

#valuesObject (readonly)

Returns the value of attribute values.



2
3
4
# File 'lib/taobao/property.rb', line 2

def values
  @values
end