{"action":"created","issue":{"url":"https://api.github.com/repos/RubyMoney/money/issues/538","labels_url":"https://api.github.com/repos/RubyMoney/money/issues/538/labels{/name}","comments_url":"https://api.github.com/repos/RubyMoney/money/issues/538/comments","events_url":"https://api.github.com/repos/RubyMoney/money/issues/538/events","html_url":"https://github.com/RubyMoney/money/pull/538","id":94599865,"number":538,"title":"Refactor Currency#new method","user":{"login":"antstorm","id":118353,"avatar_url":"https://avatars.githubusercontent.com/u/118353?v=3","gravatar_id":"","url":"https://api.github.com/users/antstorm","html_url":"https://github.com/antstorm","followers_url":"https://api.github.com/users/antstorm/followers","following_url":"https://api.github.com/users/antstorm/following{/other_user}","gists_url":"https://api.github.com/users/antstorm/gists{/gist_id}","starred_url":"https://api.github.com/users/antstorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antstorm/subscriptions","organizations_url":"https://api.github.com/users/antstorm/orgs","repos_url":"https://api.github.com/users/antstorm/repos","events_url":"https://api.github.com/users/antstorm/events{/privacy}","received_events_url":"https://api.github.com/users/antstorm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-12T21:15:22Z","updated_at":"2015-07-14T10:33:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/RubyMoney/money/pulls/538","html_url":"https://github.com/RubyMoney/money/pull/538","diff_url":"https://github.com/RubyMoney/money/pull/538.diff","patch_url":"https://github.com/RubyMoney/money/pull/538.patch"},"body":"Another quick one:\r\n\r\nI've noticed that `|| super` in the overriden `new` method is never called, because `instances` hash is initialized with a block that calls `initialize`. So in order to make it more readable and remove duplication the initialization and caching are achieved by `instances[id] ||= super`."},"comment":{"url":"https://api.github.com/repos/RubyMoney/money/issues/comments/121196225","html_url":"https://github.com/RubyMoney/money/pull/538#issuecomment-121196225","issue_url":"https://api.github.com/repos/RubyMoney/money/issues/538","id":121196225,"user":{"login":"antstorm","id":118353,"avatar_url":"https://avatars.githubusercontent.com/u/118353?v=3","gravatar_id":"","url":"https://api.github.com/users/antstorm","html_url":"https://github.com/antstorm","followers_url":"https://api.github.com/users/antstorm/followers","following_url":"https://api.github.com/users/antstorm/following{/other_user}","gists_url":"https://api.github.com/users/antstorm/gists{/gist_id}","starred_url":"https://api.github.com/users/antstorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antstorm/subscriptions","organizations_url":"https://api.github.com/users/antstorm/orgs","repos_url":"https://api.github.com/users/antstorm/repos","events_url":"https://api.github.com/users/antstorm/events{/privacy}","received_events_url":"https://api.github.com/users/antstorm/received_events","type":"User","site_admin":false},"created_at":"2015-07-14T10:33:52Z","updated_at":"2015-07-14T10:33:52Z","body":"@printercu I've added a method for easier debugging/development access to instances. Also added a test to make sure `@@instances` are used."}}