Class: GrubY::Handlers::BaseHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/gruubY/handlers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(callback = nil, filters: nil, group: 0, exceptions: nil, &block) ⇒ BaseHandler

Returns a new instance of BaseHandler.



6
7
8
9
10
11
# File 'lib/gruubY/handlers.rb', line 6

def initialize(callback = nil, filters: nil, group: 0, exceptions: nil, &block)
  @callback = callback || block
  @filters = filters
  @group = group.to_i
  @exceptions = exceptions
end

Instance Attribute Details

#callbackObject (readonly)

Returns the value of attribute callback.



4
5
6
# File 'lib/gruubY/handlers.rb', line 4

def callback
  @callback
end

#exceptionsObject (readonly)

Returns the value of attribute exceptions.



4
5
6
# File 'lib/gruubY/handlers.rb', line 4

def exceptions
  @exceptions
end

#filtersObject (readonly)

Returns the value of attribute filters.



4
5
6
# File 'lib/gruubY/handlers.rb', line 4

def filters
  @filters
end

#groupObject (readonly)

Returns the value of attribute group.



4
5
6
# File 'lib/gruubY/handlers.rb', line 4

def group
  @group
end

Instance Method Details

#client_only?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/gruubY/handlers.rb', line 21

def client_only?
  false
end

#eventObject

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/gruubY/handlers.rb', line 13

def event
  raise NotImplementedError
end

#extract(ctx) ⇒ Object



17
18
19
# File 'lib/gruubY/handlers.rb', line 17

def extract(ctx)
  ctx
end