Class: Bitbucket::Page
- Inherits:
-
Object
- Object
- Bitbucket::Page
- Defined in:
- lib/bitbucket/page.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
Instance Method Summary collapse
-
#initialize(raw, type) ⇒ Page
constructor
A new instance of Page.
- #next ⇒ Object
- #next? ⇒ Boolean
Constructor Details
#initialize(raw, type) ⇒ Page
Returns a new instance of Page.
7 8 9 10 |
# File 'lib/bitbucket/page.rb', line 7 def initialize(raw, type) @attrs = parse_attrs(raw) @items = parse_values(raw, representation_class(type)) end |
Instance Attribute Details
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
5 6 7 |
# File 'lib/bitbucket/page.rb', line 5 def attrs @attrs end |
#items ⇒ Object (readonly)
Returns the value of attribute items.
5 6 7 |
# File 'lib/bitbucket/page.rb', line 5 def items @items end |
Instance Method Details
#next ⇒ Object
16 17 18 |
# File 'lib/bitbucket/page.rb', line 16 def next attrs.fetch(:next) end |
#next? ⇒ Boolean
12 13 14 |
# File 'lib/bitbucket/page.rb', line 12 def next? attrs.fetch(:next, false) end |