Class: VCAP::Quota::Command
- Inherits:
-
Object
- Object
- VCAP::Quota::Command
- Defined in:
- lib/vcap/quota.rb
Defined Under Namespace
Classes: ValidationError
Instance Method Summary collapse
- #build_command ⇒ Object
- #execute(command) ⇒ Object
- #parse_result(result) ⇒ Object
- #run ⇒ Object
- #validate ⇒ Object
Instance Method Details
#build_command ⇒ Object
18 19 20 |
# File 'lib/vcap/quota.rb', line 18 def build_command raise NotImplementedError end |
#execute(command) ⇒ Object
22 23 24 25 |
# File 'lib/vcap/quota.rb', line 22 def execute(command) stdout = `#{command}` [$?, stdout] end |
#parse_result(result) ⇒ Object
27 28 29 |
# File 'lib/vcap/quota.rb', line 27 def parse_result(result) result end |
#run ⇒ Object
7 8 9 10 11 12 |
# File 'lib/vcap/quota.rb', line 7 def run validate command = build_command result = execute(command) parse_result(result) end |
#validate ⇒ Object
14 15 16 |
# File 'lib/vcap/quota.rb', line 14 def validate nil end |