Class: Capwatch::Fund::Config::Demo

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

Constant Summary collapse

NAME =
"Your Demo Fund"

Instance Method Summary collapse

Instance Method Details

#create_demo_configObject



93
94
95
96
97
98
# File 'lib/capwatch/fund/config.rb', line 93

def create_demo_config
  file_name = File.expand_path(Local::FILE_NAME)
  File.open(file_name, "w") do |file|
    file.write(demo_fund_raw_data.gsub!("Basic Fund", NAME))
  end
end

#demo_fund_raw_dataObject



87
88
89
90
91
# File 'lib/capwatch/fund/config.rb', line 87

def demo_fund_raw_data
  file_path = File.join(__dir__, "..", "..", "funds", "basic.json")
  demo_fund = File.expand_path(file_path)
  File.open(demo_fund).read
end