Class: Markdownplus::Julia::DataFrameHandler::DataFrame
- Inherits:
-
Object
- Object
- Markdownplus::Julia::DataFrameHandler::DataFrame
- Defined in:
- lib/markdownplus/julia.rb
Instance Attribute Summary collapse
-
#csv ⇒ Object
readonly
Returns the value of attribute csv.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, csv) ⇒ DataFrame
constructor
A new instance of DataFrame.
- #to_julia ⇒ Object
Constructor Details
#initialize(name, csv) ⇒ DataFrame
Returns a new instance of DataFrame.
35 36 37 38 |
# File 'lib/markdownplus/julia.rb', line 35 def initialize(name, csv) @name = name @csv = csv end |
Instance Attribute Details
#csv ⇒ Object (readonly)
Returns the value of attribute csv.
33 34 35 |
# File 'lib/markdownplus/julia.rb', line 33 def csv @csv end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
32 33 34 |
# File 'lib/markdownplus/julia.rb', line 32 def name @name end |
Instance Method Details
#to_julia ⇒ Object
40 41 42 43 44 45 |
# File 'lib/markdownplus/julia.rb', line 40 def to_julia file = Tempfile.new(['data','.csv']) file.write(csv) file.close output = "#{name} = readcsv(\"#{file.path}\")\n" end |