Class: Capwatch::Fund::Config
- Inherits:
-
Object
- Object
- Capwatch::Fund::Config
- Extended by:
- Forwardable
- Defined in:
- lib/capwatch/fund/config.rb
Defined Under Namespace
Classes: Demo, Local, Parser, Remote
Instance Attribute Summary collapse
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #coins ⇒ Object
- #demo? ⇒ Boolean
- #dynamic_source ⇒ Object
-
#initialize(source: nil) ⇒ Config
constructor
A new instance of Config.
Constructor Details
Instance Attribute Details
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
10 11 12 |
# File 'lib/capwatch/fund/config.rb', line 10 def parser @parser end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
10 11 12 |
# File 'lib/capwatch/fund/config.rb', line 10 def source @source end |
Instance Method Details
#coins ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/capwatch/fund/config.rb', line 22 def coins positions.map do |symbol, quantity| Coin.new do |coin| coin.symbol = symbol coin.quantity = quantity end end end |