Class: Tins::DynamicScope::Context

Inherits:
Hash show all
Defined in:
lib/tins/dslkit.rb

Overview

A specialized Hash subclass for dynamic scope contexts.

This class automatically converts string keys to symbols for more convenient variable access.

Instance Method Summary collapse

Methods inherited from Hash

#subhash!

Methods included from Subhash

#subhash

Instance Method Details

#[](name) ⇒ Object

Retrieves a value by symbolized key.



1113
1114
1115
# File 'lib/tins/dslkit.rb', line 1113

def [](name)
  super name.to_sym
end

#[]=(name, value) ⇒ Object

Sets a value with a symbolized key.



1118
1119
1120
# File 'lib/tins/dslkit.rb', line 1118

def []=(name, value)
  super name.to_sym, value
end