Class: Wpcli::Client
- Inherits:
-
Object
- Object
- Wpcli::Client
- Defined in:
- lib/wpcli/client.rb
Instance Method Summary collapse
-
#initialize(path = "") ⇒ Client
constructor
A new instance of Client.
- #run(command) ⇒ Object
Constructor Details
#initialize(path = "") ⇒ Client
Returns a new instance of Client.
3 4 5 |
# File 'lib/wpcli/client.rb', line 3 def initialize path = "" @path = path end |
Instance Method Details
#run(command) ⇒ Object
6 7 8 9 |
# File 'lib/wpcli/client.rb', line 6 def run command output = `wp#{@path.empty? ? " " : " --path=" + @path + " "}#{command}` parse output end |