Class: VCAP::Quota::SetQuota

Inherits:
Command
  • Object
show all
Defined in:
lib/vcap/quota.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Command

#execute, #parse_result, #run

Constructor Details

#initializeSetQuota

Returns a new instance of SetQuota.



58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/vcap/quota.rb', line 58

def initialize
  @quotas = {
    :block => {
      :soft => 0,
      :hard => 0,
    },
    :inode => {
      :soft => 0,
      :hard => 0,
    },
  }
end

Instance Attribute Details

#filesystemObject

Returns the value of attribute filesystem.



55
56
57
# File 'lib/vcap/quota.rb', line 55

def filesystem
  @filesystem
end

#groupObject

Returns the value of attribute group.



54
55
56
# File 'lib/vcap/quota.rb', line 54

def group
  @group
end

#quotasObject

Returns the value of attribute quotas.



56
57
58
# File 'lib/vcap/quota.rb', line 56

def quotas
  @quotas
end

#userObject

Returns the value of attribute user.



53
54
55
# File 'lib/vcap/quota.rb', line 53

def user
  @user
end

Instance Method Details

#validateObject



71
72
73
74
75
# File 'lib/vcap/quota.rb', line 71

def validate
  assert_at_least_one_of(:user)
  assert_at_least_one_of(:filesystem)
  assert_at_least_one_of(:quotas)
end