Sha256: 7ff7038005df45c5342d3c6418288173a7e772bf6cdf905c8878be4c3fdd2521
Contents?: true
Size: 685 Bytes
Versions: 6
Compression:
Stored size: 685 Bytes
Contents
# frozen_string_literal: true module Snowpack module Console module Plugins class SliceReaders < Module def initialize(ctx) ctx.application.slices.each do |name, slice| define_method(name) do SliceDelegator.new(slice) end end end class SliceDelegator < SimpleDelegator def method_missing(name, *args, &block) if args.empty? && key?(name) self[name] else super end end private def respond_to_missing?(name) key?(name) end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems