Class: Retscli::Cli
- Inherits:
-
Thor
- Object
- Thor
- Retscli::Cli
- Defined in:
- lib/retscli.rb
Instance Method Summary collapse
Instance Method Details
#capabilities(url) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/retscli.rb', line 37 def capabilities(url) client = rets_client(url, ) begin client.login display_adapter = Retscli::DisplayAdapter.new(client) display_adapter.page(display_adapter.capabilities) client.logout rescue => e puts set_color("#{e.message}", :red) end end |
#console(url) ⇒ Object
56 57 58 59 |
# File 'lib/retscli.rb', line 56 def console(url) client = rets_client(url, ) Retscli::Shell.new(client).start end |
#validate(url) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/retscli.rb', line 17 def validate(url) client = rets_client(url, ) begin client.login client.logout puts set_color("\u2713 Valid Credentials", :green) true rescue => e puts set_color("\u2717 Invalid Credential\n#{e.message}", :red) false end end |