Class: Controll::Notify::Message::Resolver

Inherits:
Object
  • Object
show all
Defined in:
lib/controll/notify/message/resolver.rb

Constant Summary collapse

Message =
Controll::Notify::Message

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(caller, message) ⇒ Resolver

Returns a new instance of Resolver.



8
9
10
11
# File 'lib/controll/notify/message/resolver.rb', line 8

def initialize caller, message
  @caller = caller
  @message = message
end

Instance Attribute Details

#callerObject (readonly)

Returns the value of attribute caller.



6
7
8
# File 'lib/controll/notify/message/resolver.rb', line 6

def caller
  @caller
end

#messageObject (readonly)

Returns the value of attribute message.



6
7
8
# File 'lib/controll/notify/message/resolver.rb', line 6

def message
  @message
end

Instance Method Details

#resolveObject



13
14
15
# File 'lib/controll/notify/message/resolver.rb', line 13

def resolve
  message.translate? ? translator.translate : message_handler.handle
end