Class: Islo::Command
- Inherits:
-
Object
- Object
- Islo::Command
- Defined in:
- lib/islo/command.rb
Overview
Generic command execution
Direct Known Subclasses
Mysql::Client, Mysql::Init, Mysql::Server, Postgres::Client, Postgres::Init, Postgres::Server, Redis::Client, Redis::Init, Redis::Server
Defined Under Namespace
Classes: Error
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#wd ⇒ Object
readonly
Returns the value of attribute wd.
Instance Method Summary collapse
- #exec ⇒ Object
-
#initialize(args, title: nil, wd: nil) ⇒ Command
constructor
A new instance of Command.
- #title? ⇒ Boolean
Constructor Details
#initialize(args, title: nil, wd: nil) ⇒ Command
Returns a new instance of Command.
11 12 13 14 15 16 |
# File 'lib/islo/command.rb', line 11 def initialize(args, title: nil, wd: nil) @command = args.shift @args = args @title = title unless title.nil? || title.empty? @wd = Pathname.new(wd || Dir.pwd) end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
9 10 11 |
# File 'lib/islo/command.rb', line 9 def args @args end |
#command ⇒ Object (readonly)
Returns the value of attribute command.
9 10 11 |
# File 'lib/islo/command.rb', line 9 def command @command end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
8 9 10 |
# File 'lib/islo/command.rb', line 8 def title @title end |
#wd ⇒ Object (readonly)
Returns the value of attribute wd.
8 9 10 |
# File 'lib/islo/command.rb', line 8 def wd @wd end |