Class: WebFinger::Response
- Inherits:
-
ActiveSupport::HashWithIndifferentAccess
- Object
- ActiveSupport::HashWithIndifferentAccess
- WebFinger::Response
- Defined in:
- lib/webfinger/response.rb
Class Method Summary collapse
-
.new_from_hash_copying_default(hash) ⇒ Object
NOTE: Ugly hack to avoid this ActiveSupport 4.0 bug.
Instance Method Summary collapse
-
#initialize(jrd) ⇒ Response
constructor
A new instance of Response.
- #link_for(rel) ⇒ Object
Constructor Details
#initialize(jrd) ⇒ Response
Returns a new instance of Response.
6 7 8 |
# File 'lib/webfinger/response.rb', line 6 def initialize(jrd) replace jrd end |
Class Method Details
.new_from_hash_copying_default(hash) ⇒ Object
NOTE: Ugly hack to avoid this ActiveSupport 4.0 bug.
https://github.com/rails/rails/issues/11087
25 26 27 |
# File 'lib/webfinger/response.rb', line 25 def (hash) superclass. hash end |
Instance Method Details
#link_for(rel) ⇒ Object
16 17 18 19 20 |
# File 'lib/webfinger/response.rb', line 16 def link_for(rel) links.detect do |link| link[:rel] == rel end end |