Class: Dolarblue::Bolsa

Inherits:
XChange show all
Defined in:
lib/dolarblue/bolsa.rb

Overview

Class used to hold sell/buy values functionality for dollar “Official”

Instance Attribute Summary

Attributes inherited from XChange

#buy, #sell

Instance Method Summary collapse

Methods inherited from XChange

#cname, #initialize, #name, #output, #sell_output

Constructor Details

This class inherits a constructor from Dolarblue::XChange

Instance Method Details

#buy_outputString

Override buy_output since dollar “tarjeta” only has a sell value

Returns:

  • (String)

    formatted output buy exchange value, in this case n/a for not available



16
17
18
# File 'lib/dolarblue/bolsa.rb', line 16

def buy_output
  'n/a'
end

#extract_values(doc) ⇒ Object

Override extract_values since dollar “tarjeta” only has a sell value

Parameters:

  • doc (Nokogiri::HTML)

    the html document to extract values from



9
10
11
# File 'lib/dolarblue/bolsa.rb', line 9

def extract_values(doc)
  @sell = extract_val(doc, 'sell')
end