Class: App42::AppTab::Time

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(usage) ⇒ Time

This is a constructor that takes no parameter



174
175
176
# File 'lib/appTab/Usage.rb', line 174

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

Instance Attribute Details

#currencyObject

Returns the value of attribute currency.



162
163
164
# File 'lib/appTab/Usage.rb', line 162

def currency
  @currency
end

#descriptionObject

Returns the value of attribute description.



162
163
164
# File 'lib/appTab/Usage.rb', line 162

def description
  @description
end

#nameObject

Returns the value of attribute name.



162
163
164
# File 'lib/appTab/Usage.rb', line 162

def name
  @name
end

#priceObject

Returns the value of attribute price.



162
163
164
# File 'lib/appTab/Usage.rb', line 162

def price
  @price
end

#stateObject

Returns the value of attribute state.



162
163
164
# File 'lib/appTab/Usage.rb', line 162

def state
  @state
end

#timeObject

Returns the value of attribute time.



162
163
164
# File 'lib/appTab/Usage.rb', line 162

def time
  @time
end

#unitObject

Returns the value of attribute unit.



162
163
164
# File 'lib/appTab/Usage.rb', line 162

def unit
  @unit
end

#userObject

Returns the value of attribute user.



162
163
164
# File 'lib/appTab/Usage.rb', line 162

def user
  @user
end

Instance Method Details

#to_sObject

Returns the Usage Response in JSON format.

Returns:

  • the response in JSON format.



184
185
186
# File 'lib/appTab/Usage.rb', line 184

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