Class: Spritpreisrechner::Price

Inherits:
Object
  • Object
show all
Defined in:
lib/spritpreisrechner/price.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(price) ⇒ Price

Returns a new instance of Price.



5
6
7
8
9
# File 'lib/spritpreisrechner/price.rb', line 5

def initialize(price)
  @fuel_type = price[:fuelType]
  @amount = price[:amount]
  @label = price[:label]
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



3
4
5
# File 'lib/spritpreisrechner/price.rb', line 3

def amount
  @amount
end

#fuel_typeObject (readonly)

Returns the value of attribute fuel_type.



3
4
5
# File 'lib/spritpreisrechner/price.rb', line 3

def fuel_type
  @fuel_type
end

#labelObject (readonly)

Returns the value of attribute label.



3
4
5
# File 'lib/spritpreisrechner/price.rb', line 3

def label
  @label
end