Sha256: 219e003fda77fbcffd9245d7ef9a018abff48365c91b7ff3094fc4cd03b06e8f

Contents?: true

Size: 450 Bytes

Versions: 3

Compression:

Stored size: 450 Bytes

Contents

module Dreamy::Command
  class Users < Base
    
    def index
      users = @account.users
      if users.empty?
        display "No users on this account"
      else
        user_table = table do |t|
          t.headings = 'Name', 'Account Type', 'Server', 'Disk used (MB)', 'Quota (MB)'
          users.each { |u| t << [u.gecos, u.type, u.home, u.disk_used_mb, u.quota_mb]  }
        end
        display user_table
      end
    end
    
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sant0sk1-dreamy-0.1.1 lib/dreamy/commands/users.rb
sant0sk1-dreamy-0.1.2 lib/dreamy/commands/users.rb
sant0sk1-dreamy-0.2.0 lib/dreamy/commands/users.rb