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.



30
31
32
33
# File 'lib/serverkit/variables.rb', line 30

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

Instance Method Details

#bindingObject

Note:

Override visibility from private to public



36
37
38
# File 'lib/serverkit/variables.rb', line 36

def binding
  super
end