This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Here's a hack I wrote to verify the currency hash loaded by the current Ruby Money gem is the same as | |
# the hash loaded via JSON in my fork of the gem. | |
# To run this script: | |
# 1. clone my fork with git clone https://github.com/stevemorris/money, and cd to the root of the project | |
# 2. download currency.rb from master to the root of the fork by running the command: | |
# curl -O https://raw.github.com/RubyMoney/money/master/lib/money/currency.rb | |
# 3. run this script from the root of the fork. the script should print 'true'. you can ignore the | |
# warning about TABLE already being initialized. | |
# 4. make a change to the TABLE hash in the currency.rb file you downloaded. then rerun the script and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Circuitry | |
extend self | |
attr_reader :circuits | |
@circuits = {} | |
def []=(name, definition) | |
@circuits[name] ||= definition | |
end |