Class: Resources::User

Inherits:
Base
  • Object
show all
Defined in:
lib/minglr/resources/user.rb

Class Method Summary collapse

Methods inherited from Base

configure, print_collection, warn

Class Method Details



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/minglr/resources/user.rb', line 5

def self.print_all(options = [])
  attributes = [:login, :name, :email]
  users = find(:all).collect! { |user| user.user }
  users.send(:extend, Minglr::Extensions::Array)
  users = users.filter(attributes, options)
  if users.any?
    print_collection users, attributes, :right
  else
    warn "No users in project"
  end
end