Skip to content

Commit

Permalink
Even more speed improvements by taking local variable instead of chec…
Browse files Browse the repository at this point in the history
…king value in hash
  • Loading branch information
Andrius Chamentauskas committed Jun 13, 2011
1 parent 934d41c commit 6664094
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/simple_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def configure(&block)
def group(name, &block)
(@groups[name] ||= Config.new).tap do |group|
group.configure(&block) if block_given?
define_accessor(name) { @groups[name] }
define_accessor(name) { group }
end
end

def set(key, value)
define_accessor(key) { @settings[key] }
define_accessor(key) { value }
@settings[key] = value
end

Expand Down

0 comments on commit 6664094

Please sign in to comment.