Module: BerkeleyLibrary::Util::XLSX::RubyXLCellExtensions

Included in:
RubyXL::Cell
Defined in:
lib/berkeley_library/util/xlsx/rubyxl_cell_extensions.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


17
18
19
20
21
# File 'lib/berkeley_library/util/xlsx/rubyxl_cell_extensions.rb', line 17

def blank?
  return true if value.nil?

  value.respond_to?(:strip) && value.strip.empty?
end

#initialize(params = nil) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/berkeley_library/util/xlsx/rubyxl_cell_extensions.rb', line 8

def initialize(params = nil)
  super

  return unless params.respond_to?(:[])

  @worksheet ||= params[:worksheet]
  self.row ||= params[:row] # NOTE: not an instance variable
end