Class: Propro::Command
- Inherits:
-
Object
- Object
- Propro::Command
- Defined in:
- lib/propro/command.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #function_name ⇒ Object
-
#initialize(name) ⇒ Command
constructor
A new instance of Command.
- #to_bash ⇒ Object
Constructor Details
#initialize(name) ⇒ Command
Returns a new instance of Command.
5 6 7 |
# File 'lib/propro/command.rb', line 5 def initialize(name) @name = name.to_s end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/propro/command.rb', line 3 def name @name end |
Instance Method Details
#function_name ⇒ Object
9 10 11 |
# File 'lib/propro/command.rb', line 9 def function_name @function_name ||= "provision-#{name.gsub(/\/|\_/, '-')}" end |
#to_bash ⇒ Object
13 14 15 |
# File 'lib/propro/command.rb', line 13 def to_bash function_name end |