Class: App42::AppTab::Level

Inherits:
Object
  • Object
show all
Defined in:
lib/appTab/Usage.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(usage) ⇒ Level

This is a constructor that takes no parameter



33
34
35
# File 'lib/appTab/Usage.rb', line 33

def initialize(usage)
  usage.levelList.push(self)
end

Instance Attribute Details

#currencyObject

Returns the value of attribute currency.



23
24
25
# File 'lib/appTab/Usage.rb', line 23

def currency
  @currency
end

#descriptionObject

Returns the value of attribute description.



23
24
25
# File 'lib/appTab/Usage.rb', line 23

def description
  @description
end

#nameObject

Returns the value of attribute name.



23
24
25
# File 'lib/appTab/Usage.rb', line 23

def name
  @name
end

#priceObject

Returns the value of attribute price.



23
24
25
# File 'lib/appTab/Usage.rb', line 23

def price
  @price
end

#stateObject

Returns the value of attribute state.



23
24
25
# File 'lib/appTab/Usage.rb', line 23

def state
  @state
end

#userObject

Returns the value of attribute user.



23
24
25
# File 'lib/appTab/Usage.rb', line 23

def user
  @user
end

Instance Method Details

#to_sObject

Returns the Usage Response in JSON format.

Returns:

  • the response in JSON format.



43
44
45
# File 'lib/appTab/Usage.rb', line 43

def to_s
  return "Name : #{@name}" + "Price : #{@price}" + "Currency : #{@currency}" + "State : #{@state}" + "Description : #{@description}";
end