Class: HookBridge::LogsResponse
- Inherits:
-
Object
- Object
- HookBridge::LogsResponse
- Defined in:
- lib/hookbridge/types.rb
Instance Attribute Summary collapse
-
#has_more ⇒ Object
readonly
Returns the value of attribute has_more.
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
-
#next_cursor ⇒ Object
readonly
Returns the value of attribute next_cursor.
Instance Method Summary collapse
-
#initialize(data) ⇒ LogsResponse
constructor
A new instance of LogsResponse.
Constructor Details
#initialize(data) ⇒ LogsResponse
Returns a new instance of LogsResponse.
97 98 99 100 101 |
# File 'lib/hookbridge/types.rb', line 97 def initialize(data) @messages = ((data["data"] || data["messages"] || data) || []).map { |entry| MessageSummary.new(entry) } @has_more = data["has_more"] || false @next_cursor = data["next_cursor"] end |
Instance Attribute Details
#has_more ⇒ Object (readonly)
Returns the value of attribute has_more.
95 96 97 |
# File 'lib/hookbridge/types.rb', line 95 def has_more @has_more end |
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
95 96 97 |
# File 'lib/hookbridge/types.rb', line 95 def @messages end |
#next_cursor ⇒ Object (readonly)
Returns the value of attribute next_cursor.
95 96 97 |
# File 'lib/hookbridge/types.rb', line 95 def next_cursor @next_cursor end |