Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2.2.1 (main):0[1] > Money.new(100, :RUB).currency.symbol
- => "₽"
- 2.2.1 (main):0[2] > show-method Money.new(100, :RUB).currency.symbol
- From: /Users/max/.rvm/gems/ruby-2.2.1/gems/money-6.5.1/lib/money/currency.rb @ line 211:
- Owner: Money::Currency
- Visibility: public
- Number of lines: 3
- attr_reader :id, :priority, :iso_code, :iso_numeric, :name, :symbol,
- :disambiguate_symbol, :html_entity, :subunit, :subunit_to_unit, :decimal_mark,
- :thousands_separator, :symbol_first, :smallest_denomination
- 2.2.1 (main):0[5] > cd Money.new(100, :RUB).currency
- 2.2.1 (RUB):1[6] > show-method initialize
- From: /Users/max/.rvm/gems/ruby-2.2.1/gems/money-6.5.1/lib/money/currency.rb @ line 227:
- Owner: Money::Currency
- Visibility: private
- Number of lines: 8
- def initialize(id)
- # cut...
- initialize_data!
- end
- 2.2.1 (RUB):1[7] > show-method initialize_data!
- From: /Users/max/.rvm/gems/ruby-2.2.1/gems/money-6.5.1/lib/money/currency.rb @ line 416:
- Owner: Money::Currency
- Visibility: private
- Number of lines: 17
- def initialize_data!
- data = self.class.table[@id]
- # cut...
- @symbol = data[:symbol]
- # cut...
- end
- 2.2.1 (RUB):1[8] > self.class.table
- => {
- :aed => {
- # cut....
- 2.2.1 (RUB):1[9] > self.class.table[:rub]
- => {
- # cut...
- :symbol => "₽",
- # cut...
- 2.2.1 (RUB):1[11] > self.class.table[:rub][:symbol] = 'rub'
- => "rub"
- 2.2.1 (RUB):1[12] > Money.new(100, :RUB).currency.symbol
- => "rub"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement