Class: MessageBird::List
Direct Known Subclasses
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#items ⇒ Object
Returns the value of attribute items.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#links ⇒ Object
Returns the value of attribute links.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#total_count ⇒ Object
Returns the value of attribute total_count.
Instance Method Summary collapse
- #[](index) ⇒ Object
-
#initialize(type, json) ⇒ List
constructor
type will be used to create objects for the items, e.g.
Methods inherited from Base
#map_hash_elements_to_self, #value_to_time
Constructor Details
#initialize(type, json) ⇒ List
type will be used to create objects for the items, e.g. List.new(Contact, {}).
12 13 14 15 16 |
# File 'lib/messagebird/list.rb', line 12 def initialize(type, json) @type = type super(json) end |
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count.
7 8 9 |
# File 'lib/messagebird/list.rb', line 7 def count @count end |
#items ⇒ Object
Returns the value of attribute items.
8 9 10 |
# File 'lib/messagebird/list.rb', line 8 def items @items end |
#limit ⇒ Object
Returns the value of attribute limit.
7 8 9 |
# File 'lib/messagebird/list.rb', line 7 def limit @limit end |
#links ⇒ Object
Returns the value of attribute links.
7 8 9 |
# File 'lib/messagebird/list.rb', line 7 def links @links end |
#offset ⇒ Object
Returns the value of attribute offset.
7 8 9 |
# File 'lib/messagebird/list.rb', line 7 def offset @offset end |
#total_count ⇒ Object
Returns the value of attribute total_count.
7 8 9 |
# File 'lib/messagebird/list.rb', line 7 def total_count @total_count end |
Instance Method Details
#[](index) ⇒ Object
22 23 24 |
# File 'lib/messagebird/list.rb', line 22 def [](index) @items[index] end |