Class: Intercom::GenericHandlers::BaseHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/intercom/generic_handlers/base_handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method_sym, arguments, entity) ⇒ BaseHandler

Returns a new instance of BaseHandler.



6
7
8
9
10
# File 'lib/intercom/generic_handlers/base_handler.rb', line 6

def initialize(method_sym, arguments, entity)
  @method_sym = method_sym
  @arguments = arguments
  @entity = entity
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments.



4
5
6
# File 'lib/intercom/generic_handlers/base_handler.rb', line 4

def arguments
  @arguments
end

#entityObject (readonly)

Returns the value of attribute entity.



4
5
6
# File 'lib/intercom/generic_handlers/base_handler.rb', line 4

def entity
  @entity
end

#method_symObject (readonly)

Returns the value of attribute method_sym.



4
5
6
# File 'lib/intercom/generic_handlers/base_handler.rb', line 4

def method_sym
  @method_sym
end

Instance Method Details

#method_stringObject



12
13
14
# File 'lib/intercom/generic_handlers/base_handler.rb', line 12

def method_string
  method_sym.to_s
end

#raise_no_method_missing_handlerObject



16
17
18
# File 'lib/intercom/generic_handlers/base_handler.rb', line 16

def raise_no_method_missing_handler
  raise Intercom::NoMethodMissingHandler, "Could not handle '#{method_string}'"
end