Sha256: 1205dcf94b4bb83c6406b2eaf288554e207972d02ce7c38e7a47cdfd9ef79422
Contents?: true
Size: 623 Bytes
Versions: 13
Compression:
Stored size: 623 Bytes
Contents
module Lolita module Menu module Autocomplete class FileBuilder class << self def input_file File.join(Rails.root,"config","lolita-menu-urls.rb") end def output_file File.join(Rails.root,"public","lolita-menu-url.txt") end end attr_reader :file def initialize(mode) @file = File.open(self.class.output_file,mode) end def add url,label = nil @file.puts "#{url} #{label || url}" end def finalize! @file.close end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems