Class: Passwordstate::Resources::Host
- Inherits:
-
Passwordstate::Resource
- Object
- Passwordstate::Resource
- Passwordstate::Resources::Host
- Defined in:
- lib/passwordstate/resources/host.rb
Instance Attribute Summary
Attributes inherited from Passwordstate::Resource
Class Method Summary collapse
Methods inherited from Passwordstate::Resource
all, #api_path, api_path, #attributes, #delete, delete, #get, get, index_field, #initialize, #inspect, nil_as_string, passwordstate_to_ruby_field, passwordstateify_hash, post, #post, put, #put, ruby_to_passwordstate_field, #stored?
Constructor Details
This class inherits a constructor from Passwordstate::Resource
Class Method Details
.available?(client) ⇒ Boolean
36 37 38 39 40 41 42 43 |
# File 'lib/passwordstate/resources/host.rb', line 36 def self.available?(client) client.request :get, api_path true rescue Passwordstate::NotFoundError true rescue Passwordstate::ForbiddenError false end |