Class: ModSpox::Messages::Internal::TimerResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/mod_spox/messages/internal/TimerResponse.rb

Instance Attribute Summary collapse

Attributes inherited from Response

#origin

Instance Method Summary collapse

Constructor Details

#initialize(object, action, added, id) ⇒ TimerResponse

object

object to send response to

action

action removed from timer

Notification that action has been removed



13
14
15
16
17
18
# File 'lib/mod_spox/messages/internal/TimerResponse.rb', line 13

def initialize(object, action, added, id)
    super(object)
    @action = action
    @added = added
    @ident = id
end

Instance Attribute Details

#actionObject (readonly)

action from timer



7
8
9
# File 'lib/mod_spox/messages/internal/TimerResponse.rb', line 7

def action
  @action
end

#identObject (readonly)

response to message with this ID



9
10
11
# File 'lib/mod_spox/messages/internal/TimerResponse.rb', line 9

def ident
  @ident
end

Instance Method Details

#action_added?Boolean

Action was added to timer

Returns:

  • (Boolean)


20
21
22
# File 'lib/mod_spox/messages/internal/TimerResponse.rb', line 20

def action_added?
    return @added
end

#action_removed?Boolean

Action was removed from timer

Returns:

  • (Boolean)


24
25
26
# File 'lib/mod_spox/messages/internal/TimerResponse.rb', line 24

def action_removed?
    return !@added
end

#idObject

ID of message this response is for



28
29
30
# File 'lib/mod_spox/messages/internal/TimerResponse.rb', line 28

def id
    @ident
end