Class: Excelgrip::Workbooks

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

Overview

Workbook 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



60
61
62
# File 'lib/excelgrip.rb', line 60

def [](index)
  Workbook.new(@raw_object.item(index))
end

#eachObject



68
69
70
71
72
# File 'lib/excelgrip.rb', line 68

def each
  @raw_object.each {|raw_workbook|
    yield(Workbook.new(raw_workbook))
  }
end

#item(index = nil) ⇒ Object



56
57
58
# File 'lib/excelgrip.rb', line 56

def item(index=nil)
  Workbook.new(@raw_object.item(index))
end

#sizeObject



64
65
66
# File 'lib/excelgrip.rb', line 64

def size
  @raw_object.count
end