Class: StatProcessor

Inherits:
Object
  • Object
show all
Defined in:
app/processors/stat_processor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stats, listing) ⇒ StatProcessor

Returns a new instance of StatProcessor


4
5
6
7
# File 'app/processors/stat_processor.rb', line 4

def initialize(stats, listing)
  @stats = stats
  @listing = listing
end

Instance Attribute Details

#listingObject (readonly)

Returns the value of attribute listing


2
3
4
# File 'app/processors/stat_processor.rb', line 2

def listing
  @listing
end

#statsObject (readonly)

Returns the value of attribute stats


2
3
4
# File 'app/processors/stat_processor.rb', line 2

def stats
  @stats
end

Instance Method Details

#processObject


9
10
11
# File 'app/processors/stat_processor.rb', line 9

def process
  stats_repository.update_prices_for_today(listing.price)
end