class Oxcelix::Comments
The Comments
class is a parser which builds an array of comments
Attributes
commarray[RW]
@!attribute [rw] commarray
@return [Array] the array of all comments of a given sheet
@!attribute [rw] comment
@return [Hash] a hash representing a comment
comment[RW]
@!attribute [rw] commarray
@return [Array] the array of all comments of a given sheet
@!attribute [rw] comment
@return [Hash] a hash representing a comment
Public Class Methods
new()
click to toggle source
# File lib/oxcelix/sax/comments.rb, line 9 def initialize @commarray = [] @comment = {} end
Public Instance Methods
attr(name, str)
click to toggle source
Returns reference
# File lib/oxcelix/sax/comments.rb, line 22 def attr(name, str) if name == :ref @comment[:ref] = str end end
text(str)
click to toggle source
Push Cell
comment hash (comment + reference) to @commarray
# File lib/oxcelix/sax/comments.rb, line 15 def text(str) @comment[:comment] = str.gsub(' ', '') @commarray << @comment @comment = Hash.new end