Class: App42::AppTab::Storage

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(usage) ⇒ Storage

This is a constructor that takes no parameter



145
146
147
# File 'lib/appTab/Usage.rb', line 145

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

Instance Attribute Details

#currencyObject

Returns the value of attribute currency.



133
134
135
# File 'lib/appTab/Usage.rb', line 133

def currency
  @currency
end

#descriptionObject

Returns the value of attribute description.



133
134
135
# File 'lib/appTab/Usage.rb', line 133

def description
  @description
end

#nameObject

Returns the value of attribute name.



133
134
135
# File 'lib/appTab/Usage.rb', line 133

def name
  @name
end

#priceObject

Returns the value of attribute price.



133
134
135
# File 'lib/appTab/Usage.rb', line 133

def price
  @price
end

#spaceObject

Returns the value of attribute space.



133
134
135
# File 'lib/appTab/Usage.rb', line 133

def space
  @space
end

#stateObject

Returns the value of attribute state.



133
134
135
# File 'lib/appTab/Usage.rb', line 133

def state
  @state
end

#unitObject

Returns the value of attribute unit.



133
134
135
# File 'lib/appTab/Usage.rb', line 133

def unit
  @unit
end

#userObject

Returns the value of attribute user.



133
134
135
# File 'lib/appTab/Usage.rb', line 133

def user
  @user
end

Instance Method Details

#to_sObject

Returns the Usage Response in JSON format.

Returns:

  • the response in JSON format.



155
156
157
# File 'lib/appTab/Usage.rb', line 155

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