Module: PrintReleaf::Actions::List::ClassMethods

Defined in:
lib/printreleaf/actions.rb

Instance Method Summary collapse

Instance Method Details

#countObject



55
56
57
# File 'lib/printreleaf/actions.rb', line 55

def count
  list.count
end

#firstObject



47
48
49
# File 'lib/printreleaf/actions.rb', line 47

def first
  list.first
end

#lastObject



51
52
53
# File 'lib/printreleaf/actions.rb', line 51

def last
  list.last
end

#lengthObject



59
60
61
# File 'lib/printreleaf/actions.rb', line 59

def length
  list.length
end

#list(params = {}) ⇒ Object



41
42
43
44
45
# File 'lib/printreleaf/actions.rb', line 41

def list(params={})
  PrintReleaf.get(self.uri, params).map do |response|
    self.new(response)
  end
end