Class: HypermediaAPI::Link
- Inherits:
-
Object
- Object
- HypermediaAPI::Link
- Defined in:
- lib/api/link.rb
Instance Method Summary collapse
- #click(options = {}) ⇒ Object
-
#initialize(href_uri) ⇒ Link
constructor
A new instance of Link.
Constructor Details
#initialize(href_uri) ⇒ Link
Returns a new instance of Link.
4 5 6 |
# File 'lib/api/link.rb', line 4 def initialize (href_uri) @href_uri = href_uri end |
Instance Method Details
#click(options = {}) ⇒ Object
8 9 10 11 12 |
# File 'lib/api/link.rb', line 8 def click ( = {}) document = HypermediaAPI.get(@href_uri, ) rescue SocketError raise BadURI, "The client was unable to interact with a resource at #{@href_uri}." end |