Class: Exa::Resources::MonitorCollection
- Inherits:
-
Struct
- Object
- Struct
- Exa::Resources::MonitorCollection
- Defined in:
- lib/exa/resources/monitor_collection.rb
Overview
Represents a paginated list of monitors from the Exa API
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#has_more ⇒ Object
Returns the value of attribute has_more.
-
#next_cursor ⇒ Object
Returns the value of attribute next_cursor.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(data:, has_more: false, next_cursor: nil) ⇒ MonitorCollection
constructor
A new instance of MonitorCollection.
- #to_h ⇒ Object
Constructor Details
#initialize(data:, has_more: false, next_cursor: nil) ⇒ MonitorCollection
Returns a new instance of MonitorCollection.
12 13 14 15 |
# File 'lib/exa/resources/monitor_collection.rb', line 12 def initialize(data:, has_more: false, next_cursor: nil) super freeze end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data
6 7 8 |
# File 'lib/exa/resources/monitor_collection.rb', line 6 def data @data end |
#has_more ⇒ Object
Returns the value of attribute has_more
6 7 8 |
# File 'lib/exa/resources/monitor_collection.rb', line 6 def has_more @has_more end |
#next_cursor ⇒ Object
Returns the value of attribute next_cursor
6 7 8 |
# File 'lib/exa/resources/monitor_collection.rb', line 6 def next_cursor @next_cursor end |
Instance Method Details
#empty? ⇒ Boolean
17 18 19 |
# File 'lib/exa/resources/monitor_collection.rb', line 17 def empty? data.empty? end |
#to_h ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/exa/resources/monitor_collection.rb', line 21 def to_h { data: data, has_more: has_more, next_cursor: next_cursor } end |