Class: Crags::Search::Search

Inherits:
Object
  • Object
show all
Defined in:
lib/crags/search/search.rb

Direct Known Subclasses

Country, Location

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Search

Returns a new instance of Search.



6
7
8
9
10
# File 'lib/crags/search/search.rb', line 6

def initialize(opts = {})
  @opts = Config.defaults.merge(opts)
  @keyword = @opts[:keyword]
  @category = @opts[:category]
end

Instance Attribute Details

#categoryObject (readonly)

Returns the value of attribute category.



4
5
6
# File 'lib/crags/search/search.rb', line 4

def category
  @category
end

#keywordObject (readonly)

Returns the value of attribute keyword.



4
5
6
# File 'lib/crags/search/search.rb', line 4

def keyword
  @keyword
end

#optsObject (readonly)

Returns the value of attribute opts.



4
5
6
# File 'lib/crags/search/search.rb', line 4

def opts
  @opts
end