Sha256: 65de279859f4abc4727d0a238c1c1a2d1bfb9a5d9bffe874af08660cd1a11805
Contents?: true
Size: 489 Bytes
Versions: 16
Compression:
Stored size: 489 Bytes
Contents
class ImprovePagePresenter def initialize(document_path) @document_path = document_path end def github_url @github_url ||= "https://github.com/#{docs_repo}/blob/#{ENV.fetch('branch', 'master')}/#{path_to_url}" end private def path_to_url @document_path&.gsub("#{Rails.configuration.docs_base_path}/", '') end def docs_repo @docs_repo ||= YAML.safe_load(File.open("#{Rails.configuration.docs_base_path}/config/business_info.yml"))['docs_repo'] end end
Version data entries
16 entries across 16 versions & 1 rubygems