Sha256: b2460deac45e5436dfb93c5ea461e702cc3ea3f158958dba1b998f7277c384d0
Contents?: true
Size: 478 Bytes
Versions: 16
Compression:
Stored size: 478 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 = "#{File.dirname(__FILE__)}/../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
16 entries across 16 versions & 1 rubygems