Supplying arguments to method #1

Closed
casiodk opened this Issue Sep 16, 2011 · 2 comments

Comments

Projects
None yet
2 participants

casiodk commented Sep 16, 2011

Hi I like your gem, and I use it in an application. ( www.soundtracktor.com , under development)

Would it be possible to change it, so that you could supply the exchange methods with arguments ...

Example

                  1899.usd_to_dkk

Becomes ...

                  1899.switch_currency( "usd", "dkk" )

That would help me a lot, cause I need to output a price, depending on which country the current_user comes from... And then i could do something like

                  1899.switch_currency( "usd", "#{current_user.country.currency_code}" )

Thanks a lot

/Nicolai

@ghost ghost assigned staskie Sep 22, 2011

Owner

staskie commented Sep 22, 2011

Hi Nicolai

I take your point and will extend the gem with the new functionality.

Kind Regards
Dominik

staskie added a commit that referenced this issue Sep 26, 2011

Owner

staskie commented Oct 9, 2011

Hi Nicolai,

I added new method and now you can do things like:

3.exchange("usd","gbp")

Kind Regards,
Dominik

@staskie staskie closed this Oct 9, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment