Sha256: da985f78d3e8cb32186b4f186b6ae0147582909e8bdfbe1112a409eec97e11d2
Contents?: true
Size: 605 Bytes
Versions: 10
Compression:
Stored size: 605 Bytes
Contents
# frozen_string_literal: true module Epuber class HashBinding # @param [Hash] vars # def initialize(vars = {}) @vars = vars end # @return [Boolean] # def respond_to_missing?(name, _include_private = false) @vars.key?(name) || super end # @param [String] name # def method_missing(name) raise NameError, "Not found value for key #{name}" unless @vars.key?(name) @vars[name] end # rubocop:disable Naming/AccessorMethodName def get_binding binding end # rubocop:enable Naming/AccessorMethodName end end
Version data entries
10 entries across 10 versions & 1 rubygems