Sha256: 2a9a40fe9d025266eabbea02083daf8663bc1c7219e3bd3234c96c7c70dd3db0
Contents?: true
Size: 499 Bytes
Versions: 5
Compression:
Stored size: 499 Bytes
Contents
module Lookbook class Component < Entity attr_accessor :name def initialize(name) @name = name super(path) end def path name.underscore 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
5 entries across 5 versions & 1 rubygems