Class: String

Inherits:
Object
  • Object
show all
Includes:
MoneyExchange
Defined in:
lib/money_exchange.rb,
lib/money_exchange/core_ext.rb

Constant Summary

Constants included from MoneyExchange

MoneyExchange::VERSION

Instance Method Summary collapse

Methods included from MoneyExchange

#method_missing

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class MoneyExchange

Instance Method Details

#~Object



2
3
4
5
# File 'lib/money_exchange/core_ext.rb', line 2

def ~
  margin = scan(/^ +/).map(&:size).min
  gsub(/^ {#{margin}}/, '')
end