Module: CardmarketCLI::Entities::Deletable
- Included in:
- Wantslist
- Defined in:
- lib/cardmarket_cli/entities/deletable.rb
Overview
marks that an entity can be deleted
Instance Method Summary collapse
Instance Method Details
#list_attr(symbol, options = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/cardmarket_cli/entities/deletable.rb', line 8 def list_attr(symbol, = {}) = { plural: "#{symbol}s", default: true, suffix: true, add: 'add', delete: 'delete', hash: false } .merge!() def_modifiers(symbol, [:plural], ) def_reader([:plural], [:hash]) def_brackets([:plural], [:hash]) if [:default] def_clear([:plural], [:hash]) symbol end |