Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cache the YML config to avoid multiple file reads.

  • Loading branch information...
commit 02f9abf1ccae377a95fcb01da18d924b5ff46310 1 parent e2bd477
@dbalatero dbalatero authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/asset_sync/config.rb
View
2  lib/asset_sync/config.rb
@@ -71,7 +71,7 @@ def yml_exists?
end
def yml
- y ||= YAML.load(ERB.new(IO.read(yml_path)).result)[Rails.env] rescue nil || {}
+ @yml ||= YAML.load(ERB.new(IO.read(yml_path)).result)[Rails.env] rescue nil || {}
end
def yml_path
Please sign in to comment.
Something went wrong with that request. Please try again.