Class: HAStats::Actions::Base
- Inherits:
-
Object
- Object
- HAStats::Actions::Base
- Defined in:
- lib/hastats/actions/base.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#socket ⇒ Object
Returns the value of attribute socket.
Instance Method Summary collapse
- #command(*args) ⇒ Object
-
#initialize(socket, options = {}) ⇒ Base
constructor
A new instance of Base.
- #response ⇒ Object
- #run(*args) ⇒ Object
Constructor Details
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
3 4 5 |
# File 'lib/hastats/actions/base.rb', line 3 def @options end |
#socket ⇒ Object
Returns the value of attribute socket.
3 4 5 |
# File 'lib/hastats/actions/base.rb', line 3 def socket @socket end |
Instance Method Details
#command(*args) ⇒ Object
18 19 20 |
# File 'lib/hastats/actions/base.rb', line 18 def command(*args) raise NotImplementedError end |
#response ⇒ Object
14 15 16 |
# File 'lib/hastats/actions/base.rb', line 14 def response HAStats::Responses::Base end |
#run(*args) ⇒ Object
10 11 12 |
# File 'lib/hastats/actions/base.rb', line 10 def run(*args) response.new socket.run(command(*args)) end |