class Excelgrip::GripWrapper
Constants
- OLE_METHODS
Public Class Methods
new(raw_object)
click to toggle source
# File lib/excelgrip/GripWrapper.rb, line 3 def initialize(raw_object) if raw_object.methods.include?("raw") @raw_object = raw_object.raw else @raw_object = raw_object end end
Public Instance Methods
inspect()
click to toggle source
# File lib/excelgrip/GripWrapper.rb, line 15 def inspect() "<#{self.class}>" end
raw()
click to toggle source
# File lib/excelgrip/GripWrapper.rb, line 11 def raw @raw_object end
Private Instance Methods
method_missing(m_id, *params)
click to toggle source
# File lib/excelgrip/GripWrapper.rb, line 22 def method_missing(m_id, *params) unless OLE_METHODS.include?(m_id) missing_method_name = m_id.to_s.downcase methods.each {|method| if method.to_s.downcase == missing_method_name return send(method, *params) end } end # Undefined Method is throwed to raw_object begin @raw_object.send(m_id, *params) rescue raise $!,$!.message, caller end end
toRaw(target_obj)
click to toggle source
# File lib/excelgrip/GripWrapper.rb, line 39 def toRaw(target_obj) target_obj.respond_to?("raw") ? target_obj.raw : target_obj end