Module: Lotu::Behavior

Included in:
Actor, Game
Defined in:
lib/lotu/behavior.rb

Instance Method Summary collapse

Instance Method Details

#behave_like(something) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/lotu/behavior.rb', line 4

def behave_like something
  include something
  class << self
    attr_accessor :behavior_options
  end
  @behavior_options ||= Hash.new
end

#inherited(subclass) ⇒ Object



12
13
14
# File 'lib/lotu/behavior.rb', line 12

def inherited subclass
  subclass.behavior_options = behavior_options.deep_copy
end