class Workbook::NilValue

Used in cases col or rowspans are used

Public Class Methods

new(reason) click to toggle source

initialize this special nilvalue with a reason @param [String] reason (currently only :covered, in case this cell is coverd because an adjecant cell spans over it)

# File lib/workbook/nil_value.rb, line 10
def initialize reason
  self.reason= reason
end

Public Instance Methods

<=>(v) click to toggle source
# File lib/workbook/nil_value.rb, line 20
def <=> v
  value <=> v
end
reason() click to toggle source
# File lib/workbook/nil_value.rb, line 24
def reason
  @reason
end
reason=(reason) click to toggle source

set the reason why this value is nil

# File lib/workbook/nil_value.rb, line 29
def reason= reason
  if reason == :covered
    @reason = reason
  else
    raise "invalid reason given"
  end
end
value() click to toggle source

returns the value of itself (nil) @return [NilClass] nil

# File lib/workbook/nil_value.rb, line 16
def value
  nil
end