Sha256: ddd6e3022c842a9622838513b3dc9a1b69e2ca8dc4e5c5381a6e377314de1694
Contents?: true
Size: 634 Bytes
Versions: 4
Compression:
Stored size: 634 Bytes
Contents
# frozen_string_literal: true module PagesCore module Templates class ConfigurationProxy def initialize(callback, parent = nil) @callback = callback @parent = parent end def method_missing(method_name, *args, &block) if @parent && block @callback.call(@parent, method_name, block) elsif @parent @callback.call(@parent, method_name, *args) elsif block @callback.call(method_name, block) else @callback.call(method_name, *args) end end def respond_to_missing? true end end end end
Version data entries
4 entries across 4 versions & 1 rubygems