Class: Atheme::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/atheme/service.rb

Class Method Summary collapse

Class Method Details

.inherited(klass) ⇒ Object



2
3
4
# File 'lib/atheme/service.rb', line 2

def self.inherited(klass)
  Atheme::SERVICES << klass.name.gsub('Atheme::', '')
end

.method_missing(method, *args, &block) ⇒ Object



6
7
8
9
10
# File 'lib/atheme/service.rb', line 6

def self.method_missing(method, *args, &block)
  raise Atheme::NoUserSetError, 'No user has been set' if Atheme.user.nil?

  Atheme.call('atheme.command', Atheme.user.cookie, Atheme.user.username, Atheme.user.ip, self.name.gsub('Atheme::', ''), method, *args)
end