Class: TeamsIncomingClients::PostResult

Inherits:
Object
  • Object
show all
Defined in:
lib/teams_incoming_clients/models/post_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result, reason, message) ⇒ PostResult

Returns a new instance of PostResult.



5
6
7
8
9
# File 'lib/teams_incoming_clients/models/post_result.rb', line 5

def initialize(result, reason, message)
  @result = result
  @reason = reason
  @message = message.to_s
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



3
4
5
# File 'lib/teams_incoming_clients/models/post_result.rb', line 3

def message
  @message
end

#reasonObject (readonly)

Returns the value of attribute reason.



3
4
5
# File 'lib/teams_incoming_clients/models/post_result.rb', line 3

def reason
  @reason
end

Instance Method Details

#fail?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/teams_incoming_clients/models/post_result.rb', line 15

def fail?
  !result
end

#ok?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/teams_incoming_clients/models/post_result.rb', line 11

def ok?
  !!result
end