[ruby/win32ole] Move toplevel constant for olegen under `WIN32OLE`

https://github.com/ruby/win32ole/commit/78ff137c0f
This commit is contained in:
Nobuyoshi Nakada 2023-12-31 18:24:59 +09:00 коммит произвёл git
Родитель 3ad54239b5
Коммит 8074525b2b
1 изменённых файлов: 15 добавлений и 3 удалений

Просмотреть файл

@ -1,7 +1,12 @@
# frozen_string_literal: false
# OLEProperty
# helper class of Property with arguments.
class OLEProperty
class WIN32OLE
end
# OLEProperty is a helper class of Property with arguments, used by
# `olegen.rb`-generated files.
class WIN32OLE::Property
# :stopdoc:
def initialize(obj, dispid, gettypes, settypes)
@obj = obj
@dispid = dispid
@ -14,4 +19,11 @@ class OLEProperty
def []=(*args)
@obj._setproperty(@dispid, args, @settypes)
end
# :stopdoc:
end
module WIN32OLE::VariantType
# Alias for `olegen.rb`-generated files, that should include
# WIN32OLE::VARIANT.
OLEProperty = WIN32OLE::Property
end