Class: Itch::Bundle

Inherits:
Object
  • Object
show all
Includes:
SimpleInspect
Defined in:
lib/itch/bundle.rb

Overview

Data container for single bundle

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SimpleInspect

#exclude_inspection, #inspect, #pretty_print_instance_variables

Constructor Details

#initialize(id, title, purchases, price, earnings) ⇒ Bundle

Returns a new instance of Bundle.



12
13
14
15
16
17
18
# File 'lib/itch/bundle.rb', line 12

def initialize(id, title, purchases, price, earnings)
  @id = id
  @title = title
  @purchases = purchases
  @price = price
  @earnings = earnings
end

Instance Attribute Details

#earningsObject

Returns the value of attribute earnings.



10
11
12
# File 'lib/itch/bundle.rb', line 10

def earnings
  @earnings
end

#gamesObject

Returns the value of attribute games.



10
11
12
# File 'lib/itch/bundle.rb', line 10

def games
  @games
end

#idObject

Returns the value of attribute id.



10
11
12
# File 'lib/itch/bundle.rb', line 10

def id
  @id
end

#priceObject

Returns the value of attribute price.



10
11
12
# File 'lib/itch/bundle.rb', line 10

def price
  @price
end

#purchasesObject

Returns the value of attribute purchases.



10
11
12
# File 'lib/itch/bundle.rb', line 10

def purchases
  @purchases
end

#titleObject

Returns the value of attribute title.



10
11
12
# File 'lib/itch/bundle.rb', line 10

def title
  @title
end

Instance Method Details

#urlObject



20
21
22
# File 'lib/itch/bundle.rb', line 20

def url
  format(Itch::URL::BUNDLE, id: @id)
end