Class: Excelgrip::Worksheets

Inherits:
GripWrapper show all
Defined in:
lib/excelgrip.rb

Overview

Worksheet Collection Class ================

Instance Method Summary collapse

Methods inherited from GripWrapper

#initialize, #inspect, #raw

Constructor Details

This class inherits a constructor from Excelgrip::GripWrapper

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Excelgrip::GripWrapper

Instance Method Details

#[](index) ⇒ Object Also known as: item



80
81
82
83
84
# File 'lib/excelgrip.rb', line 80

def [](index)
  raw_worksheet = @raw_object.item(index)
  raw_worksheet.Activate
  Worksheet.new(raw_worksheet)
end

#eachObject



92
93
94
95
96
97
# File 'lib/excelgrip.rb', line 92

def each
  @raw_object.each {|raw_worksheet|
    raw_worksheet.Activate
    yield(Worksheet.new(raw_worksheet))
  }
end

#sizeObject



88
89
90
# File 'lib/excelgrip.rb', line 88

def size
  @raw_object.count
end