Class: Ginbin::Command

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title:, cmd:) ⇒ Command

Returns a new instance of Command.



5
6
7
8
# File 'lib/ginbin/command.rb', line 5

def initialize(title:, cmd:)
  @title = title
  @cmd = cmd
end

Instance Attribute Details

#titleObject (readonly)

Returns the value of attribute title.



3
4
5
# File 'lib/ginbin/command.rb', line 3

def title
  @title
end

Instance Method Details

#callObject



10
11
12
# File 'lib/ginbin/command.rb', line 10

def call
  exec @cmd
end