Class: Snafu::Models::Giant
- Inherits:
-
Object
- Object
- Snafu::Models::Giant
- Defined in:
- lib/snafu/models/giant.rb
Overview
Defines a class for Glitch Giants
Instance Attribute Summary collapse
-
#cur_daily_favor ⇒ Object
(also: #current_daily_favor)
readonly
Returns the value of attribute cur_daily_favor.
-
#cur_favor ⇒ Object
(also: #current_favor)
readonly
Returns the value of attribute cur_favor.
-
#max_daily_favor ⇒ Object
readonly
Returns the value of attribute max_daily_favor.
-
#max_favor ⇒ Object
readonly
Returns the value of attribute max_favor.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Giant
constructor
A new instance of Giant.
Constructor Details
#initialize(options = {}) ⇒ Giant
Returns a new instance of Giant.
11 12 13 14 15 16 17 |
# File 'lib/snafu/models/giant.rb', line 11 def initialize(={}) @name = [:name] || ["name"] @cur_favor = ([:cur_favor] || ["cur_favor"] || 0).to_i @max_favor = ([:max_favor] || ["max_favor"] || 0).to_i @cur_daily_favor = ([:cur_daily_favor] || ["cur_daily_favor"] || 0).to_i @max_daily_favor = ([:max_daily_favor] || ["max_daily_favor"] || 0).to_i end |
Instance Attribute Details
#cur_daily_favor ⇒ Object (readonly) Also known as: current_daily_favor
Returns the value of attribute cur_daily_favor.
6 7 8 |
# File 'lib/snafu/models/giant.rb', line 6 def cur_daily_favor @cur_daily_favor end |
#cur_favor ⇒ Object (readonly) Also known as: current_favor
Returns the value of attribute cur_favor.
6 7 8 |
# File 'lib/snafu/models/giant.rb', line 6 def cur_favor @cur_favor end |
#max_daily_favor ⇒ Object (readonly)
Returns the value of attribute max_daily_favor.
6 7 8 |
# File 'lib/snafu/models/giant.rb', line 6 def max_daily_favor @max_daily_favor end |
#max_favor ⇒ Object (readonly)
Returns the value of attribute max_favor.
6 7 8 |
# File 'lib/snafu/models/giant.rb', line 6 def max_favor @max_favor end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/snafu/models/giant.rb', line 6 def name @name end |