Class: Ambling::Stock::Settings::DataSets::DataSet::Csv

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/ambling/stock.rb

Overview

false

(true / false) If this is set to false, then the oldest date should be on the

top and increase when going down. If you newest date is on the top, set this to "false" #

Defined Under Namespace

Classes: Columns

Constant Summary collapse

VALUES =
[:reverse,:separator,:skip_first_rows,:skip_last_rows,:show_last_rows,:date_format,:decimal_separator,:columns,:data]

Instance Attribute Summary collapse

Method Summary

Methods included from Base

#build_xml, #initialize, #populate, #to_xml

Instance Attribute Details

#columnsObject

Returns the value of attribute columns.



348
349
350
# File 'lib/ambling/stock.rb', line 348

def columns
  @columns
end

#dataObject

Returns the value of attribute data.



352
353
354
# File 'lib/ambling/stock.rb', line 352

def data
  @data
end

#date_formatObject

.

(separator) Decimal separator in your csv file #



337
338
339
# File 'lib/ambling/stock.rb', line 337

def date_format
  @date_format
end

#decimal_separatorObject

columns define columns of your data file. There should be at least two columns, and

one of them should be defined as "date". For simple line chart it will be enough to have
these two columns, for a candlestick chart you should have 5 columns (date, open, close,
high, low) Any names can be used (only "date" column name can't be different) #


344
345
346
# File 'lib/ambling/stock.rb', line 344

def decimal_separator
  @decimal_separator
end

#reverseObject

;

(separator) Column separator of csv file #



313
314
315
# File 'lib/ambling/stock.rb', line 313

def reverse
  @reverse
end

#separatorObject

0

(Number) In case you have some header in your csv file, or you have some rows

which shouldn't be included, you can set how many rows should be skipped #


318
319
320
# File 'lib/ambling/stock.rb', line 318

def separator
  @separator
end

#show_last_rowsObject

YYYY-MM-DD

(date format) The valid symbols are: YYYY, MM, DD, hh, mm, ss. Any order

and separators can be used, for example: DD-MM-YYYY, YYYY-MM, YYYY-DD-MM hh, 
DD-MM-YY hh:mm:ss, etc #


333
334
335
# File 'lib/ambling/stock.rb', line 333

def show_last_rows
  @show_last_rows
end

#skip_first_rowsObject

0

(Number) You can set how many rows from the bottom of data csv should be skipped #



322
323
324
# File 'lib/ambling/stock.rb', line 322

def skip_first_rows
  @skip_first_rows
end

#skip_last_rowsObject

(Number) You can set the number of rows, counting from the bottom of the data csv

should be used for your data#


327
328
329
# File 'lib/ambling/stock.rb', line 327

def skip_last_rows
  @skip_last_rows
end