Class: MdlSearch::Searcher

Inherits:
Object
  • Object
show all
Defined in:
lib/mdl_search/searcher.rb

Constant Summary collapse

MDL_BASE =
'https://design.google.com'.freeze
MDL_API_SUFFIX =
'/icons/data'.freeze
MDL_API_FOR_ALL_ICONS_INFO_SUFFIX =
'/grid.json'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSearcher

Returns a new instance of Searcher.



10
11
12
13
# File 'lib/mdl_search/searcher.rb', line 10

def initialize
  @agent = create_agent
  @result = all_icons_info_json
end

Instance Attribute Details

#agentObject

Returns the value of attribute agent.



3
4
5
# File 'lib/mdl_search/searcher.rb', line 3

def agent
  @agent
end

#resultObject

Returns the value of attribute result.



4
5
6
# File 'lib/mdl_search/searcher.rb', line 4

def result
  @result
end

Instance Method Details

#groups_as_yamlObject



19
20
21
# File 'lib/mdl_search/searcher.rb', line 19

def groups_as_yaml
  show_as_yaml groups
end

#icons_as_yamlObject



15
16
17
# File 'lib/mdl_search/searcher.rb', line 15

def icons_as_yaml
  show_as_yaml icons
end