Class: Rubyfox::Client::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/rubyfox/client/event.rb

Class Method Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



16
17
18
# File 'lib/rubyfox/client/event.rb', line 16

def method_missing(name, *args, &block)
  self[name]
end

Class Method Details

.[](name) ⇒ Object



12
13
14
# File 'lib/rubyfox/client/event.rb', line 12

def self.[](name)
  const_get(name.to_s.upcase)
end

.types(&block) ⇒ Object



8
9
10
# File 'lib/rubyfox/client/event.rb', line 8

def self.types(&block)
  constants
end

Instance Method Details

#inspectObject



20
21
22
# File 'lib/rubyfox/client/event.rb', line 20

def inspect
  "#{super}: #{type}(#{arguments.inspect})"
end