Method: Accountability::Offerable.add

Defined in:
app/models/accountability/offerable.rb

.add(category, tenant: :default, trait: nil, class_name:) ⇒ Object



18
19
20
21
22
23
24
# File 'app/models/accountability/offerable.rb', line 18

def self.add(category, tenant: :default, trait: nil, class_name:)
  category = category.to_s.underscore.downcase.to_sym
  offerable = new(category, tenant: tenant, trait: trait, class_name: class_name)
  collection[category] = offerable

  offerable
end