Class: GetFx::Validator
- Inherits:
-
Object
- Object
- GetFx::Validator
- Defined in:
- lib/getFx.rb
Instance Method Summary collapse
- #amt ⇒ Object
- #currency(value) ⇒ Object
- #date(value) ⇒ Object
-
#initialize ⇒ Validator
constructor
A new instance of Validator.
Constructor Details
#initialize ⇒ Validator
Returns a new instance of Validator.
61 62 63 |
# File 'lib/getFx.rb', line 61 def initialize() @doc = Nokogiri::HTML(open("https://s3.eu-west-2.amazonaws.com/cq-dev-storage/feed.xml")) end |
Instance Method Details
#amt ⇒ Object
91 92 |
# File 'lib/getFx.rb', line 91 def amt end |
#currency(value) ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/getFx.rb', line 65 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) ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/getFx.rb', line 78 def date(value) if value r = @doc.css("[@time='" + value + "']") if r return r else return nil end else return nil end end |