Class: Propro::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/propro/command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (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_nameObject



9
10
11
# File 'lib/propro/command.rb', line 9

def function_name
  @function_name ||= "provision-#{name.gsub(/\/|\_/, '-')}"
end

#to_bashObject



13
14
15
# File 'lib/propro/command.rb', line 13

def to_bash
  function_name
end