What it exactly do these do ( RubyXL::Parser.parse and Roo::Excelx.new) when opening a file?

84 views
Skip to first unread message

Monserrat Foster

unread,
Oct 21, 2013, 11:35:06 AM10/21/13
to rubyonra...@googlegroups.com
Do they open a file and load it into memory? 

I'm asking because it seems to take a long time opening a file but after it opens looping into the variable is REALLY fast, could someone explain me or tell me where can I find an explanaition on how this sort of things work?

Joel Pearson

unread,
Oct 21, 2013, 11:52:28 AM10/21/13
to rubyonra...@googlegroups.com
Usually the simplest way to learn how a gem works internally is to go
and read the source code. This should be available in the gem files, on
a github repository, or in the documentation.

--
Posted via http://www.ruby-forum.com/.

Monserrat Foster

unread,
Oct 21, 2013, 11:59:57 AM10/21/13
to rubyonra...@googlegroups.com
I'm asking because I'm new to both ruby and rails and my knowledge is not enough to understand source code

Joel Pearson

unread,
Oct 21, 2013, 12:00:42 PM10/21/13
to rubyonra...@googlegroups.com
I haven't examined Roo, but you can see RubyXL reading the file into
memory here:
https://github.com/gilt/rubyXL/blob/master/lib/rubyXL/parser.rb
Reply all
Reply to author
Forward
0 new messages