Method: Lookbook::Collection#initialize
- Defined in:
- lib/lookbook/collection.rb
#initialize(path = "", items = []) ⇒ Collection
Returns a new instance of Collection.
9 10 11 12 13 14 15 16 17 |
# File 'lib/lookbook/collection.rb', line 9 def initialize(path = "", items = []) if path.is_a?(Array) @items = path path = "" else @items = items end @path = path.delete_prefix("/").delete_suffix("/") end |