Sha256: 4d341bc371f8db9543b76703446af89aaeee4a98600eab9deec701430ca2b76a
Contents?: true
Size: 451 Bytes
Versions: 3
Compression:
Stored size: 451 Bytes
Contents
# frozen_string_literal: true require 'yaml' require 'hashie' require 'active_support/all' require_relative 'komeda/item' require_relative 'komeda/version' module Komeda MENUS_FILE_PATH = './config/menus.yaml' menus = YAML.load_file(MENUS_FILE_PATH, aliases: true, permitted_classes: [Time]).deep_symbolize_keys menus.each_key do |key| define_singleton_method(key) do menus[key].map { |item| Komeda::Item[item] } end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
komeda-0.1.2 | lib/komeda.rb |
komeda-0.1.1 | lib/komeda.rb |
komeda-0.1.0 | lib/komeda.rb |