class Creek::Book
Attributes
files[R]
sheets[R]
Public Class Methods
new(path, options = {})
click to toggle source
# File lib/creek/book.rb, line 12 def initialize path, options = {} check_file_extension = options.fetch(:check_file_extension, true) if check_file_extension extension = File.extname(options[:original_filename] || path).downcase raise 'Not a valid file format.' unless (['.xlsx', '.xlsm'].include? extension) end @files = Zip::File.open path @shared_strings = SharedStrings.new(self) end
Public Instance Methods
close()
click to toggle source
# File lib/creek/book.rb, line 34 def close @files.close end
style_types()
click to toggle source
# File lib/creek/book.rb, line 30 def style_types @style_types ||= Creek::Styles.new(self).style_types end