Class: PfrpgRaces::StatBonus
- Inherits:
-
Object
- Object
- PfrpgRaces::StatBonus
- Includes:
- PfrpgUtility::Affectable
- Defined in:
- lib/pfrpg_races/stat_bonus.rb
Instance Attribute Summary collapse
-
#bonus ⇒ Object
readonly
Returns the value of attribute bonus.
-
#stat ⇒ Object
readonly
Returns the value of attribute stat.
Instance Method Summary collapse
- #effects ⇒ Object
-
#initialize(stat, bonus) ⇒ StatBonus
constructor
A new instance of StatBonus.
Constructor Details
#initialize(stat, bonus) ⇒ StatBonus
Returns a new instance of StatBonus.
5 6 7 8 |
# File 'lib/pfrpg_races/stat_bonus.rb', line 5 def initialize(stat, bonus) @stat = stat @bonus = bonus end |
Instance Attribute Details
#bonus ⇒ Object (readonly)
Returns the value of attribute bonus.
4 5 6 |
# File 'lib/pfrpg_races/stat_bonus.rb', line 4 def bonus @bonus end |
#stat ⇒ Object (readonly)
Returns the value of attribute stat.
4 5 6 |
# File 'lib/pfrpg_races/stat_bonus.rb', line 4 def stat @stat end |
Instance Method Details
#effects ⇒ Object
10 11 12 |
# File 'lib/pfrpg_races/stat_bonus.rb', line 10 def effects "attribute:#{stat.downcase}:#{bonus}" end |