Class: Itch::Reward

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

Overview

Data container for single reward

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SimpleInspect

#exclude_inspection, #inspect, #pretty_print_instance_variables

Constructor Details

#initialize(amount:, description:, price:, title:, archived: false, claimed: 0, id: nil) ⇒ Reward

rubocop:disable Metrics/ParameterLists



15
16
17
18
19
20
21
22
23
# File 'lib/itch/reward.rb', line 15

def initialize(amount:, description:, price:, title:, archived: false, claimed: 0, id: nil)
  @id = id
  @description = description
  @title = title
  @amount = amount
  @price = price
  @claimed = claimed
  @archived = archived
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



12
13
14
# File 'lib/itch/reward.rb', line 12

def amount
  @amount
end

#archivedObject

Returns the value of attribute archived.



12
13
14
# File 'lib/itch/reward.rb', line 12

def archived
  @archived
end

#claimedObject

Returns the value of attribute claimed.



12
13
14
# File 'lib/itch/reward.rb', line 12

def claimed
  @claimed
end

#descriptionObject

Returns the value of attribute description.



12
13
14
# File 'lib/itch/reward.rb', line 12

def description
  @description
end

#idObject

Returns the value of attribute id.



12
13
14
# File 'lib/itch/reward.rb', line 12

def id
  @id
end

#priceObject

Returns the value of attribute price.



12
13
14
# File 'lib/itch/reward.rb', line 12

def price
  @price
end

#titleObject

Returns the value of attribute title.



12
13
14
# File 'lib/itch/reward.rb', line 12

def title
  @title
end