Class: MuchRails::Layout::HeadLink

Inherits:
Object
  • Object
show all
Defined in:
lib/much-rails/layout.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(href, **attributes) ⇒ HeadLink

Returns a new instance of HeadLink.



131
132
133
134
# File 'lib/much-rails/layout.rb', line 131

def initialize(href, **attributes)
  @href = href
  @attributes = attributes
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



129
130
131
# File 'lib/much-rails/layout.rb', line 129

def attributes
  @attributes
end

#hrefObject (readonly)

Returns the value of attribute href.



129
130
131
# File 'lib/much-rails/layout.rb', line 129

def href
  @href
end

Instance Method Details

#==(other) ⇒ Object



136
137
138
139
140
# File 'lib/much-rails/layout.rb', line 136

def ==(other)
  super unless other.is_a?(self.class)

  href == other.href && attributes == other.attributes
end