summaryrefslogtreecommitdiff
path: root/ext/win32ole/win32ole.c
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-01-07 08:56:04 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-01-07 08:56:04 +0000
commitb84ff5ccb390581242c34f67453802c34b97dcea (patch)
treee1c7c7a918920e23db2ab3f946df97f504275e50 /ext/win32ole/win32ole.c
parentd9591028f28606a6e855088eb15538d1730f3918 (diff)
add some test. update comment for rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/win32ole/win32ole.c')
-rw-r--r--ext/win32ole/win32ole.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index ea2fe62c4c..053bb2f813 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -2746,10 +2746,20 @@ fole_setproperty2(VALUE self, VALUE dispid, VALUE args, VALUE types)
/*
* call-seq:
- * WIN32OLE['property']=val
- * WIN32OLE.setproperty('property', [arg1, arg2,...] val)
+ * WIN32OLE[a1, a2, ...]=val
*
- * Sets property of OLE object.
+ * Sets the value to WIN32OLE object specified by a1, a2, ...
+ *
+ * dict = WIN32OLE.new('Scripting.Dictionary')
+ * dict.add('ruby', 'RUBY')
+ * dict['ruby'] = 'Ruby'
+ * puts dict['ruby'] # => 'Ruby'
+ *
+ * Remark: You can not use this method to set the property value.
+ *
+ * excel = WIN32OLE.new('Excel.Application')
+ * # excel['Visible'] = true # This is error !!!
+ * excel.Visible = true # You should to use this style to set the property.
*
*/
static VALUE
@@ -2780,12 +2790,19 @@ fole_setproperty(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * WIN32OLE['property']
+ * WIN32OLE[a1,a2,...]
*
- * Returns property of OLE object.
+ * Returns the value of Collection specified by a1, a2,....
*
+ * dict = WIN32OLE.new('Scripting.Dictionary')
+ * dict.add('ruby', 'Ruby')
+ * puts dict['ruby'] # => 'Ruby' (same as `puts dict.item('ruby')')
+ *
+ * Remark: You can not use this method to get the property.
* excel = WIN32OLE.new('Excel.Application')
- * puts excel['Visible'] # => false
+ * # puts excel['Visible'] This is error !!!
+ * puts excel.Visible # You should to use this style to get the property.
+ *
*/
static VALUE
fole_getproperty_with_bracket(int argc, VALUE *argv, VALUE self)