Class: Bitbucket::Page

Inherits:
Object
  • Object
show all
Defined in:
lib/bitbucket/page.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attrsObject (readonly)

Returns the value of attribute attrs


5
6
7
# File 'lib/bitbucket/page.rb', line 5

def attrs
  @attrs
end

#itemsObject (readonly)

Returns the value of attribute items


5
6
7
# File 'lib/bitbucket/page.rb', line 5

def items
  @items
end

Instance Method Details

#nextObject


16
17
18
# File 'lib/bitbucket/page.rb', line 16

def next
  attrs.fetch(:next)
end

#next?Boolean

Returns:

  • (Boolean)

12
13
14
# File 'lib/bitbucket/page.rb', line 12

def next?
  attrs.fetch(:next, false)
end