class ApmexSilverQuoteOnly

Public Class Methods

new(options) click to toggle source
Calls superclass method QuoteOnly::new
# File lib/quote-only.rb, line 73
def initialize(options)
        super(options)
        @css = 'table.table-spot-prices > tbody > tr:nth-child(2) > td:nth-child(2) > span'
        @url = 'http://www.apmex.com'
        match()
end

Public Instance Methods

match() click to toggle source
Calls superclass method QuoteOnly#match
# File lib/quote-only.rb, line 80
def match
        super
        css_text_match = /(\d+\.\d+)/.match(@quote.to_s)
        @quote = css_text_match[1].to_f
end