Class: Leadlight::NullLink

Inherits:
Object
  • Object
show all
Includes:
Addressable
Defined in:
lib/leadlight/null_link.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(href) ⇒ NullLink

Returns a new instance of NullLink.



8
9
10
# File 'lib/leadlight/null_link.rb', line 8

def initialize(href)
  @href = href
end

Instance Attribute Details

#hrefObject (readonly)

Returns the value of attribute href.



6
7
8
# File 'lib/leadlight/null_link.rb', line 6

def href
  @href
end

Instance Method Details

#==(other) ⇒ Object



12
13
14
15
# File 'lib/leadlight/null_link.rb', line 12

def ==(other)
  other.is_a?(self.class) &&
    href == other.href
end

#paramsObject



17
18
19
# File 'lib/leadlight/null_link.rb', line 17

def params
  URI.parse(href).query_values || {}
end