Class: BentoSearch::Link

Inherits:
Object
  • Object
show all
Includes:
Results::Serialization
Defined in:
app/models/bento_search/link.rb

Overview

Represents an ‘additional link’ held in BentoSearch::ResultItem#other_links

label, url, other metadata about the link.

Instance Method Summary collapse

Methods included from Results::Serialization

#dump_to_json, #internal_state_hash

Constructor Details

#initialize(hash = {}) ⇒ Link

Returns a new instance of Link.



31
32
33
34
35
36
37
# File 'app/models/bento_search/link.rb', line 31

def initialize(hash = {})
  self.style_classes = []
  
  hash.each_pair do |key, value|
    send("#{key}=", value)
  end            
end