Class: Ruvi::EditorApp::Settings
- Inherits:
-
Hash
- Object
- Hash
- Ruvi::EditorApp::Settings
- Defined in:
- lib/shikaku.rb
Instance Attribute Summary collapse
-
#gens ⇒ Object
Returns the value of attribute gens.
-
#procs ⇒ Object
Returns the value of attribute procs.
Instance Method Summary collapse
- #[](a) ⇒ Object
- #[]=(a, b) ⇒ Object
-
#initialize ⇒ Settings
constructor
A new instance of Settings.
Constructor Details
#initialize ⇒ Settings
Returns a new instance of Settings.
104 105 106 107 108 |
# File 'lib/shikaku.rb', line 104 def initialize super @gens = {} @procs = {} end |
Instance Attribute Details
#gens ⇒ Object
Returns the value of attribute gens.
103 104 105 |
# File 'lib/shikaku.rb', line 103 def gens @gens end |
#procs ⇒ Object
Returns the value of attribute procs.
103 104 105 |
# File 'lib/shikaku.rb', line 103 def procs @procs end |
Instance Method Details
#[](a) ⇒ Object
109 110 111 |
# File 'lib/shikaku.rb', line 109 def [](a) @gens.has_key?(a) ? @gens[a].call : super(a) end |
#[]=(a, b) ⇒ Object
112 113 114 115 |
# File 'lib/shikaku.rb', line 112 def []=(a, b) super a, b @procs[a].call if @procs.has_key? a end |