Module: CardmarketCLI::Entities::Unique
- Included in:
- MetaProduct, Product, Wantslist
- Defined in:
- lib/cardmarket_cli/entities/unique.rb
Overview
Makes a class unique
Instance Method Summary collapse
Instance Method Details
#uniq_attr(symbol, options = {}) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/cardmarket_cli/entities/unique.rb', line 8 def uniq_attr(symbol, = {}) = { hash: true, plural: "#{symbol}s", index: :id }.merge! def_brackets([:plural], [:hash]) def_add([:plural], [:hash], [:index]) def_reader([:plural], [:hash]) end |