Class: BC::QuoteDetail

Inherits:
Object
  • Object
show all
Defined in:
lib/bloomberg_currency/quote_detail.rb

Overview

Quote Details Class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ QuoteDetail

Returns a new instance of QuoteDetail.



8
9
10
11
12
13
14
# File 'lib/bloomberg_currency/quote_detail.rb', line 8

def initialize(attributes = {})
  @open                = process_float(attributes[:open])
  @day_range           = process_range(attributes[:day_range])
  @previous_close      = process_float(attributes[:previous_close])
  @last_52_weeks_range = process_range(attributes[:"52wk_range"])
  @ytd_return          = process_float(attributes[:ytd_return])
end

Instance Attribute Details

#day_rangeObject

Returns the value of attribute day_range.



6
7
8
# File 'lib/bloomberg_currency/quote_detail.rb', line 6

def day_range
  @day_range
end

#last_52_weeks_rangeObject

Returns the value of attribute last_52_weeks_range.



6
7
8
# File 'lib/bloomberg_currency/quote_detail.rb', line 6

def last_52_weeks_range
  @last_52_weeks_range
end

#openObject

Returns the value of attribute open.



6
7
8
# File 'lib/bloomberg_currency/quote_detail.rb', line 6

def open
  @open
end

#previous_closeObject

Returns the value of attribute previous_close.



6
7
8
# File 'lib/bloomberg_currency/quote_detail.rb', line 6

def previous_close
  @previous_close
end

#ytd_returnObject

Returns the value of attribute ytd_return.



6
7
8
# File 'lib/bloomberg_currency/quote_detail.rb', line 6

def ytd_return
  @ytd_return
end