Class: SrvManager::Command
- Inherits:
-
Object
- Object
- SrvManager::Command
- Defined in:
- lib/srv_manager/command.rb
Instance Attribute Summary collapse
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#rvm ⇒ Object
readonly
Returns the value of attribute rvm.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text, options = {}) ⇒ Command
constructor
A new instance of Command.
- #to_hash ⇒ Object
Constructor Details
#initialize(text, options = {}) ⇒ Command
Returns a new instance of Command.
9 10 11 12 13 14 |
# File 'lib/srv_manager/command.rb', line 9 def initialize(text, ={}) @text = text @dir = File. [:dir].to_s @env = [:env] || {} @rvm = [:rvm] || false end |
Instance Attribute Details
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
5 6 7 |
# File 'lib/srv_manager/command.rb', line 5 def dir @dir end |
#env ⇒ Object (readonly)
Returns the value of attribute env.
6 7 8 |
# File 'lib/srv_manager/command.rb', line 6 def env @env end |
#rvm ⇒ Object (readonly)
Returns the value of attribute rvm.
7 8 9 |
# File 'lib/srv_manager/command.rb', line 7 def rvm @rvm end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
4 5 6 |
# File 'lib/srv_manager/command.rb', line 4 def text @text end |
Instance Method Details
#to_hash ⇒ Object
16 17 18 |
# File 'lib/srv_manager/command.rb', line 16 def to_hash {text: text, dir: dir, env: env, rvm: rvm} end |