Sha256: 6492c6c076a7e7aa5e652462fdc49bb7bc4bf031d0fed7d64a00d4361359e505
Contents?: true
Size: 858 Bytes
Versions: 8
Compression:
Stored size: 858 Bytes
Contents
module Hippo module Templates class Base include ::Hippo::Concerns::AttrAccessorWithDefault class_attribute :defined_format attr_accessor_with_default :extension_id def self.format(fmt) self.defined_format = fmt end def root_path Hippo::ROOT_PATH.join('templates') end def pathname root_path.join(filename) end def class_as_name self.class.to_s.demodulize.underscore end def filename class_as_name + self.extension end def source pathname.read end def extension '.' + defined_format.to_s end end end end
Version data entries
8 entries across 8 versions & 1 rubygems