class MdlSearch::Updater
Attributes
searcher[W]
Public Class Methods
new()
click to toggle source
# File lib/mdl_search/updater.rb, line 4 def initialize @searcher = Searcher.new end
Public Instance Methods
groups_from_yaml()
click to toggle source
# File lib/mdl_search/updater.rb, line 24 def groups_from_yaml YAML.load(File.read(File.expand_path('./yaml/groups.yml'))) end
update_groups_yaml()
click to toggle source
# File lib/mdl_search/updater.rb, line 16 def update_groups_yaml file_path = File.expand_path('../../../yaml/groups.yml', __FILE__) File.open(file_path, 'w') do |file| file.write @searcher.groups_as_yaml end puts 'complete updating groups yaml file... plz check it.' end
update_icons_yaml()
click to toggle source
# File lib/mdl_search/updater.rb, line 8 def update_icons_yaml file_path = File.expand_path('../../../yaml/icons.yml', __FILE__) File.open(file_path, 'w') do |file| file.write @searcher.icons_as_yaml end puts 'complete updating icons yaml file... plz check it.' end