Sha256: 18b553ca2e878bdf4a3c9fc7ba1ff2cdbbded3c907e46a0b6a5dfa10c747fd57
Contents?: true
Size: 554 Bytes
Versions: 15
Compression:
Stored size: 554 Bytes
Contents
module Lookbook class Component < Entity attr_accessor :name def initialize(name) @name = name super(path) end def path name.underscore end def rel_path Pathname.new("#{path}.rb") end def full_path Pathname.new("#{Lookbook.config.components_path}/#{path}.rb") end def dir_path full_path.dirname end def template_path Dir.glob("#{Lookbook.config.components_path}/#{path}.*.erb").first end def inline? template_path.present? end end end
Version data entries
15 entries across 15 versions & 1 rubygems