Class: ModSpox::Models::Server

Inherits:
Sequel::Model
  • Object
show all
Defined in:
lib/mod_spox/models/Server.rb

Overview

Attributes provided by model:

host

hostname of server

port

port to connect to

priority

priority of this entry (higher number == greater priority)

connected

bot is connected to this server

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.filter(args = {}) ⇒ Object



10
11
12
13
# File 'lib/mod_spox/models/Server.rb', line 10

def Server.filter(args={})
    args[:host].downcase! if args.has_key?(:host)
    super(args)
end

.find_or_create(args = {}) ⇒ Object



15
16
17
18
# File 'lib/mod_spox/models/Server.rb', line 15

def Server.find_or_create(args={})
    args[:host].downcase! if args.has_key?(:host)
    super(args)
end

Instance Method Details

#host=(host_name) ⇒ Object



20
21
22
23
# File 'lib/mod_spox/models/Server.rb', line 20

def host=(host_name)
    host_name.downcase!
    super(host_name)
end