Sha256: 38415e2433c39ae5bc570c63e0d6983eab68ffb5935507f07d259188a5d50215
Contents?: true
Size: 707 Bytes
Versions: 11
Compression:
Stored size: 707 Bytes
Contents
include_set Abstract::Sources include_set Abstract::CodeContent class << self def included host_class track_mod_name host_class, caller end def track_mod_name host_class, caller host_class.mattr_accessor :file_content_mod_name host_class.file_content_mod_name = Card::Set.mod_name(caller) end end def source_paths # OVERRIDE to use paths for content end def content Array.wrap(source_paths).map do |path| if (source_path = find_file path) Rails.logger.debug "reading file: #{source_path}" ::File.read source_path end end.compact.join "\n" end format :html do view :file_size do "#{card.name}: #{number_to_human_size card.content.bytesize}" end end
Version data entries
11 entries across 11 versions & 1 rubygems