Sha256: 37af7bc6228e38bee355e997dbe68a351c4e2e2ab2c35bd61c10ac39118a70db
Contents?: true
Size: 592 Bytes
Versions: 71
Compression:
Stored size: 592 Bytes
Contents
class CodeSnippetsHomePresenter def code_snippets @code_snippets ||= config['code_snippets'].map do |snippet| OpenStruct.new( html: Nexmo::Markdown::Renderer.new.call( <<-STRING ```code_snippets source: '#{snippet['source']}' ``` STRING ), title: snippet['title'] ) end end def cache_key @cache_key ||= config['code_snippets'].join('-') end def config @config ||= YAML.safe_load( File.open("#{Rails.configuration.docs_base_path}/config/business_info.yml") ) end end
Version data entries
71 entries across 71 versions & 1 rubygems