Sha256: 780cec18a891a89bc1c6c74d021352868d4d40bb76a1995bc88bcc6df442b431
Contents?: true
Size: 921 Bytes
Versions: 19
Compression:
Stored size: 921 Bytes
Contents
module Lookbook class PreviewGroup include Utils attr_reader :name, :examples, :preview def initialize(name, preview, examples) @name = name @preview = preview @examples = examples end def id generate_id(lookup_path) end def path "#{@preview.path}/#{name}" end def label name.titleize end def type :group end def params examples.map(&:params).flatten.uniq { |param| param[:name] } end def display_params merged = {} examples.reverse.map do |example| merged.merge! example.display_params end merged end def hidden? false end def position 10000 end def matchers normalize_matchers(@preview.label, label) end def hierarchy_depth @preview.hierarchy_depth + 1 end alias_method :lookup_path, :path end end
Version data entries
19 entries across 19 versions & 1 rubygems