Class: Retscli::Cli
- Inherits:
-
Thor
- Object
- Thor
- Retscli::Cli
- Defined in:
- lib/retscli.rb
Instance Method Summary collapse
Instance Method Details
#capabilities(url) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/retscli.rb', line 39 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
59 60 61 62 |
# File 'lib/retscli.rb', line 59 def console(url) client = rets_client(url, ) Retscli::Shell.new(client).start end |
#validate(url) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/retscli.rb', line 18 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 |