class Oakdex::Pokemon::GrowthEvents::Base
Represents Base
GrowthEvent
Public Class Methods
new(pokemon, options = {})
click to toggle source
# File lib/oakdex/pokemon/growth_events/base.rb, line 7 def initialize(pokemon, options = {}) @pokemon = pokemon @options = options end
Public Instance Methods
execute(_action = nil)
click to toggle source
# File lib/oakdex/pokemon/growth_events/base.rb, line 24 def execute(_action = nil) remove_event end
message()
click to toggle source
# File lib/oakdex/pokemon/growth_events/base.rb, line 20 def message raise 'implement me' end
possible_actions()
click to toggle source
# File lib/oakdex/pokemon/growth_events/base.rb, line 16 def possible_actions [] end
read_only?()
click to toggle source
# File lib/oakdex/pokemon/growth_events/base.rb, line 12 def read_only? possible_actions.empty? end
to_h()
click to toggle source
# File lib/oakdex/pokemon/growth_events/base.rb, line 28 def to_h { name: self.class.name, options: @options } end
Private Instance Methods
remove_event()
click to toggle source
# File lib/oakdex/pokemon/growth_events/base.rb, line 37 def remove_event @pokemon.remove_growth_event end