Class: Serverkit::Variables::BindableMash

Inherits:
Hashie::Mash
  • Object
show all
Defined in:
lib/serverkit/variables.rb

Constant Summary collapse

DEFAULT_PROC =
->(hash, key) do
  raise KeyError, "key not found: #{key.inspect} (perhaps variables are wrong?)"
end

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ BindableMash

Note:

Override to raise KeyError on missing key

Returns a new instance of BindableMash.



32
33
34
35
# File 'lib/serverkit/variables.rb', line 32

def initialize(*, &block)
  super
  self.default_proc = DEFAULT_PROC
end

Instance Method Details

#bindingObject

Note:

Override visibility from private to public



38
39
40
# File 'lib/serverkit/variables.rb', line 38

def binding # rubocop:disable Lint/UselessMethodDefinition
  super
end