class Pincers::Core::Replicas::Link
Attributes
ref[R]
Public Class Methods
new(_backend, _element)
click to toggle source
# File lib/pincers/core/replicas/link.rb, line 8 def initialize(_backend, _element) @backend = _backend @ref = Pincers::Http::Utils.parse_uri _backend.extract_element_attribute(_element, :href) end
Public Instance Methods
fetch(_http_client=nil)
click to toggle source
# File lib/pincers/core/replicas/link.rb, line 13 def fetch(_http_client=nil) client = _http_client || @backend.as_http_client client.get(@ref) end