Class: Dolarblue::Configuration
- Inherits:
-
Object
- Object
- Dolarblue::Configuration
- Includes:
- Singleton
- Defined in:
- lib/dolarblue/configuration.rb
Overview
Singleton configuration class
Instance Method Summary collapse
-
#blue_regexp ⇒ Regexp
Regular expression to be used to match the Tweet text for ‘blue` value In order to extract the integer value from $1 and the decimal value from $2.
-
#blue_screen_name ⇒ String
Twitter screen name for the ‘blue` dollar value.
-
#buy_sell_blue_factor ⇒ Float
Default gap factor between the blue sale value vs.
-
#buy_sell_official_factor ⇒ Float
Default gap factor between the official sale value vs.
-
#card_fee ⇒ Float
Dollar “tarjeta” AR fee on top of official value.
-
#official_regexp ⇒ Regexp
Regular expression to be used to match the Tweet text for official value In order to extract the integer value from $1 and the decimal value from $2.
-
#official_screen_name ⇒ String
Twitter screen name for the official (legal) dollar value.
Instance Method Details
#blue_regexp ⇒ Regexp
Regular expression to be used to match the Tweet text for ‘blue` value In order to extract the integer value from $1 and the decimal value from $2
36 37 38 |
# File 'lib/dolarblue/configuration.rb', line 36 def blue_regexp /\$(\d+)[\.,](\d+)/ end |
#blue_screen_name ⇒ String
Twitter screen name for the ‘blue` dollar value
28 29 30 |
# File 'lib/dolarblue/configuration.rb', line 28 def blue_screen_name 'DolarBlue' end |
#buy_sell_blue_factor ⇒ Float
Default gap factor between the blue sale value vs. the buy value Usually 4.5%
21 22 23 |
# File 'lib/dolarblue/configuration.rb', line 21 def buy_sell_blue_factor Float(0.965) end |
#buy_sell_official_factor ⇒ Float
Default gap factor between the official sale value vs. the buy value Usually 1.5%
13 14 15 |
# File 'lib/dolarblue/configuration.rb', line 13 def buy_sell_official_factor Float(0.985) end |
#card_fee ⇒ Float
Dollar “tarjeta” AR fee on top of official value
58 59 60 |
# File 'lib/dolarblue/configuration.rb', line 58 def card_fee 1.2 end |
#official_regexp ⇒ Regexp
Regular expression to be used to match the Tweet text for official value In order to extract the integer value from $1 and the decimal value from $2
51 52 53 |
# File 'lib/dolarblue/configuration.rb', line 51 def official_regexp /[Dd]olar: (\d+)[\.,](\d+)/ end |
#official_screen_name ⇒ String
Twitter screen name for the official (legal) dollar value
43 44 45 |
# File 'lib/dolarblue/configuration.rb', line 43 def official_screen_name 'cotizacionhoyar' end |