Class: Commands::Wishlist

Inherits:
Object
  • Object
show all
Includes:
OutputSuppressor
Defined in:
lib/discogs/wishlist/commands/wishlist.rb

Instance Method Summary collapse

Methods included from OutputSuppressor

#suppress_output

Constructor Details

#initialize(username:, for_sale:, country_code:) ⇒ Wishlist

Returns a new instance of Wishlist.



13
14
15
16
17
# File 'lib/discogs/wishlist/commands/wishlist.rb', line 13

def initialize(username:, for_sale:, country_code:)
  @username = username
  @for_sale = for_sale
  @country_code = country_code
end

Instance Method Details

#performObject



19
20
21
22
23
24
25
26
# File 'lib/discogs/wishlist/commands/wishlist.rb', line 19

def perform
  suppress_output do
    populate_wishlist
    populate_items_for_sale if show_for_sale?
  end

  print_wishlist
end