Class: SeoFriendly::SourceSearcher

Inherits:
Object
  • Object
show all
Defined in:
lib/seo_friendly/source_searcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model) ⇒ SourceSearcher

Returns a new instance of SourceSearcher.



6
7
8
# File 'lib/seo_friendly/source_searcher.rb', line 6

def initialize(model)
  @object = model
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



4
5
6
# File 'lib/seo_friendly/source_searcher.rb', line 4

def object
  @object
end

Instance Method Details

#find_sourceObject



10
11
12
# File 'lib/seo_friendly/source_searcher.rb', line 10

def find_source
  source or raise SourceNotDefinedError.new(find, object)
end