Class: AutoBidder
- Inherits:
-
Object
- Object
- AutoBidder
- Defined in:
- lib/auto_bidder.rb
Instance Method Summary collapse
-
#initialize(url, options) ⇒ AutoBidder
constructor
A new instance of AutoBidder.
- #start ⇒ Object
Constructor Details
#initialize(url, options) ⇒ AutoBidder
Returns a new instance of AutoBidder.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/auto_bidder.rb', line 10 def initialize(url, ) @num_bids = 0 # Glean the TLD name from the host and use it to create the auction interface host = URI.parse(url).host begin @auction_interface = Module.const_get(host.split(".")[-2].capitalize).new(url, ) rescue NameError $log.fatal "Auction site #{host} not supported" end end |
Instance Method Details
#start ⇒ Object
22 23 24 25 |
# File 'lib/auto_bidder.rb', line 22 def start @auction_interface.connect_to_auction @auction_interface.start_monitoring end |