Module: Jah::Command::ClassMethods

Defined in:
lib/jah/command.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*meth) ⇒ Object



16
17
18
19
# File 'lib/jah/command.rb', line 16

def method_missing(*meth)
  read
  @res[meth[0].to_sym]
end

Instance Method Details

#register(handler, regex) ⇒ Object



21
22
23
# File 'lib/jah/command.rb', line 21

def register(handler, regex)
  COMM << [handler, /^#{regex}/, self]
end