class GetFx::Validator

Public Class Methods

new() click to toggle source
# File lib/getFx.rb, line 65
def initialize()
  @doc = Nokogiri::HTML(open("https://s3.eu-west-2.amazonaws.com/cq-dev-storage/feed.xml"))
end

Public Instance Methods

amt() click to toggle source
# File lib/getFx.rb, line 95
def amt
end
currency(value) click to toggle source
# File lib/getFx.rb, line 69
def currency(value)
  if value
    r = @doc.at_css("[@currency='" + value + "']")
    if r
      return r
    else
      return nil
    end
  else
    return nil
  end
end
date(value) click to toggle source
# File lib/getFx.rb, line 82
def date(value)
  if value
    r = @doc.css("[@time='" + value + "']")
    if r
      return r
    else
      return nil
    end
  else
    return nil
  end
end