Class: Capwatch::Fund::Config::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/capwatch/fund/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject

Returns the value of attribute name.



36
37
38
# File 'lib/capwatch/fund/config.rb', line 36

def name
  @name
end

#positionsObject

Returns the value of attribute positions.



36
37
38
# File 'lib/capwatch/fund/config.rb', line 36

def positions
  @positions
end

#raw_dataObject

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

#parseObject



42
43
44
# File 'lib/capwatch/fund/config.rb', line 42

def parse
  @parse ||= JSON.parse(raw_data)
end