Module: HasOptions

Included in:
StateFu::Machine, StateFu::Sprocket, StateFu::Transition
Defined in:
lib/support/has_options.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
6
7
# File 'lib/support/has_options.rb', line 3

def self.included(base)
  base.class_eval do
    attr_accessor :options
  end
end

Instance Method Details

#[](v) ⇒ Object



9
10
11
# File 'lib/support/has_options.rb', line 9

def []v
  options[v]
end

#[]=(v, k) ⇒ Object



13
14
15
# File 'lib/support/has_options.rb', line 13

def []=v,k
  options[v]=k
end