Class: Catalog::Drawer

Inherits:
Object
  • Object
show all
Defined in:
lib/catalog/models/drawer.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rule:, path:) ⇒ Drawer

Returns a new instance of Drawer.



5
6
7
8
# File 'lib/catalog/models/drawer.rb', line 5

def initialize(rule:, path:)
  @rule = rule
  @path = path
end

Instance Attribute Details

#pathObject

Returns the value of attribute path.



3
4
5
# File 'lib/catalog/models/drawer.rb', line 3

def path
  @path
end

#ruleObject

Returns the value of attribute rule.



3
4
5
# File 'lib/catalog/models/drawer.rb', line 3

def rule
  @rule
end

Class Method Details

.allObject



10
11
12
# File 'lib/catalog/models/drawer.rb', line 10

def self.all
  Catalog::Config.drawers.map { |attributes| self.class.new(attributes) }
end