Sha256: 4912edf25f4ec470e9977b7a6e3dff727b53624a2b37731a01f01f3b4e0ed19a

Contents?: true

Size: 610 Bytes

Versions: 1

Compression:

Stored size: 610 Bytes

Contents

module Resources
  
  class User < Base
    
    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
    
    def self.find_user_id_for_user(user)
      if user = Resources::User.find(:all).select { |user| user.user.login == user }.first
        user.user_id
      end
    end
    
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
schubert-minglr-1.2.0 lib/minglr/resources/user.rb