Class: Notesgrip::GripWrapper
- Inherits:
-
Object
- Object
- Notesgrip::GripWrapper
- Defined in:
- lib/notesgrip/GripWrapper.rb
Direct Known Subclasses
NotesACL, NotesACLEntry, NotesAdministrationProcess, NotesAgent, NotesColorObject, NotesDatabase, NotesDateTime, NotesDbDirectory, NotesDocument, NotesDocumentCollection, NotesEmbeddedObject, NotesForm, NotesInternational, NotesItem, NotesLog, NotesMIMEEntity, NotesMIMEHeader, NotesName, NotesNewsLetter, NotesNoteCollection, NotesOutline, NotesOutlineEntry, NotesRegistration, NotesReplication, NotesReplicationEntry, NotesRichTextDocLink, NotesRichTextNavigator, NotesRichTextParagraphStyle, NotesRichTextRange, NotesRichTextSection, NotesRichTextStyle, NotesRichTextTab, NotesRichTextTable, NotesSession, NotesStream, NotesView, NotesViewColumn, NotesViewEntry, NotesViewEntryCollection, NotesViewNavigator
Instance Method Summary collapse
-
#initialize(raw_object) ⇒ GripWrapper
constructor
A new instance of GripWrapper.
- #inspect ⇒ Object
- #raw ⇒ Object
Constructor Details
#initialize(raw_object) ⇒ GripWrapper
Returns a new instance of GripWrapper.
3 4 5 6 7 8 9 |
# File 'lib/notesgrip/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 |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m_id, *params) ⇒ Object (private)
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/notesgrip/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 $!,$!., caller end end |
Instance Method Details
#inspect ⇒ Object
15 16 17 |
# File 'lib/notesgrip/GripWrapper.rb', line 15 def inspect() "<#{self.class}>" end |
#raw ⇒ Object
11 12 13 |
# File 'lib/notesgrip/GripWrapper.rb', line 11 def raw @raw_object end |