Class: Capwatch::Fund::Config::Parser
- Inherits:
-
Object
- Object
- Capwatch::Fund::Config::Parser
- Defined in:
- lib/capwatch/fund/config.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#positions ⇒ Object
Returns the value of attribute positions.
-
#raw_data ⇒ Object
Returns the value of attribute raw_data.
Instance Method Summary collapse
-
#initialize(source:) ⇒ Parser
constructor
A new instance of Parser.
- #parse ⇒ Object
Constructor Details
#initialize(source:) ⇒ Parser
Returns a new instance of Parser.
38 39 40 |
# File 'lib/capwatch/fund/config.rb', line 38 def initialize(source:) @raw_data = source.get_data end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
36 37 38 |
# File 'lib/capwatch/fund/config.rb', line 36 def name @name end |
#positions ⇒ Object
Returns the value of attribute positions.
36 37 38 |
# File 'lib/capwatch/fund/config.rb', line 36 def positions @positions end |
#raw_data ⇒ Object
Returns the value of attribute raw_data.
36 37 38 |
# File 'lib/capwatch/fund/config.rb', line 36 def raw_data @raw_data end |
Instance Method Details
#parse ⇒ Object
42 43 44 |
# File 'lib/capwatch/fund/config.rb', line 42 def parse @parse ||= JSON.parse(raw_data) end |