Speed up compilation a bit.
This commit is contained in:
parent
e71e267eab
commit
4fa7fdd14b
@ -128,11 +128,20 @@ def mixin_signature(mixin)
|
|||||||
mixin.sass_signature(:include)
|
mixin.sass_signature(:include)
|
||||||
end
|
end
|
||||||
|
|
||||||
def mixin_examples(item, mixin)
|
def example_items
|
||||||
@items.select do |i|
|
@example_items ||= @items.select{|i| i[:example]}
|
||||||
i[:example] &&
|
end
|
||||||
|
|
||||||
|
def examples_for_item(item)
|
||||||
|
@examples ||= {}
|
||||||
|
@examples[item] ||= example_items.select do |i|
|
||||||
i[:framework] == item[:framework] &&
|
i[:framework] == item[:framework] &&
|
||||||
i[:stylesheet] == item[:stylesheet] &&
|
i[:stylesheet] == item[:stylesheet]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def mixin_examples(item, mixin)
|
||||||
|
examples_for_item(item).select do |i|
|
||||||
i[:mixin] == mixin.name
|
i[:mixin] == mixin.name
|
||||||
end.map{|i| i.reps.find{|r| r.name == :default}}
|
end.map{|i| i.reps.find{|r| r.name == :default}}
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user