Class: Ruvi::EditorApp::Settings

Inherits:
Hash
  • Object
show all
Defined in:
lib/shikaku.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSettings

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

#gensObject

Returns the value of attribute gens.



103
104
105
# File 'lib/shikaku.rb', line 103

def gens
  @gens
end

#procsObject

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