Class: M2Config::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/m2config/handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(fields) ⇒ Handler

Returns a new instance of Handler.

Raises:

  • (ArgumentError)


5
6
7
8
9
10
11
# File 'lib/m2config/handler.rb', line 5

def initialize( fields )
  raise ArgumentError, "The send and receive endpoints can not be the same" if
    fields[:send_spec] == fields[:recv_spec]
  fields[:recv_ident] ||= ""
  super(fields, false)
  save
end

Instance Method Details

#typeObject



13
14
15
# File 'lib/m2config/handler.rb', line 13

def type
  "handler"
end