59件ヒット
[1-59件を表示]
(0.085秒)
別のキーワード
種類
- 文書 (37)
- インスタンスメソッド (22)
ライブラリ
- win32ole (22)
クラス
-
WIN32OLE
_ TYPE (11) -
WIN32OLE
_ VARIABLE (11)
キーワード
-
NEWS for Ruby 3
. 0 . 0 (4) - Ruby用語集 (11)
-
ruby 1
. 8 . 3 feature (11) - クラス/メソッドの定義 (11)
検索結果
先頭5件
-
WIN32OLE
_ TYPE # variables -> [WIN32OLE _ VARIABLE] (18237.0) -
型が持つ変数を取得します。
...e')
vars = tobj.variables
vars.each do |v|
puts "#{v.name} = #{v.value}"
end
上記を実行すると以下の出力が得られます。
xlChart = -4109
xlDialogSheet = -4116
xlExcel4IntlMacroSheet = 4
xlExcel4MacroSheet = 3
xlWorksheet = -4167
@see WIN32OL... -
WIN32OLE
_ VARIABLE # value -> object | nil (18237.0) -
変数の値を取得します。
...ます。valueメソッ
ドはこのような定数値を返します。
@return この変数が持つ定数値。値を持たない場合はnilを返します。
tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'XlSheetType')
variables = tobj.variables
variables.each do |......variable|
puts "#{variable.name}=#{variable.value}"
end
実行結果は以下となります。
xlChart=-4109
xlDialogSheet=-4116
xlExcel4IntlMacroSheet=4
xlExcel4MacroSheet=3
xlWorksheet=-4167... -
ruby 1
. 8 . 3 feature (1530.0) -
ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))
...されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* only backward-compatibility
* 影響の範囲が小さいと思われる変更もこちら
* [change]: 変更されたクラス/メソッドなど(互換......りました。
$ ruby-1.8.2 -e 'p File.join(1, 2)'
"1/2"
$ ruby-1.8.3 -e 'p File.join(1, 2)'
-e:1:in `join': can't convert Fixnum into String (TypeError)
from -e:1
=== 2005-09-16
: File.extname [ruby] [compat]
与えられた pathname がピリオドで終る......ました。- を _ に変換してグローバル変数を定義するようになりました。- 以外の
記号がふくまれる場合は、例外 NameError を投げます。
$ ruby-1.8.2 -se 'puts global_variables.grep(/foo/)' -- --foo-bar
$-foo-bar
$ ruby-1.8.3 -se 'puts gl... -
NEWS for Ruby 3
. 0 . 0 (348.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...mlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}
* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern matching is redesigned. [EXPERIMENTAL]
* `=>` is added. It can be used like a rightward assignment.
17260
* `in......ozen when
`# frozen-string-literal: true` is used. 17104
* Magic comment `shareable_constant_value` added to freeze constants.
See {Magic Comments}[rdoc-ref:doc/syntax/comments.rdoc@Magic+Comments] for more details.
17273
* A {static analysis}[rdoc-label:label-Static+analysis] founda......e no longer shown by default (since Ruby 2.7.2).
Turn them on with `-W:deprecated` (or with `-w` to show other warnings too).
16345
* `$SAFE` and `$KCODE` are now normal global variables with no special behavior.
C-API methods related to `$SAFE` have been removed.
16131 17136
* y... -
Ruby用語集 (210.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
...l#percent
: 0 オリジン
: zero-based
番号が 0 から始まること。
例えば、
Array や Vector、Matrix などの要素の番号、
String における文字の位置、
といったものは 0 オリジンである。
: 1 オリジン
: one-based
番号が 1 から始ま......。そうでない場所では、メソッドを使って
間接的に参照・代入できる。
→アクセッサー
参照:d:spec/variables#instance
: インスタンスメソッド
: instance method
クラスやモジュールに定義されるメソッドは、定義方法によ......関係が
なく、再定義もできない。
代入式「n = 1」における「=」は代入演算子である。
「str.size」「user&.name」といったメソッド呼び出しにおける
「.」「&.」も演算子である。
「[*0..9]」におけるいわゆる splat 展開の... -
クラス/メソッドの定義 (144.0)
-
クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined
...い場合は nil を返します。
===[a:method] メソッド定義
//emlist[例][ruby]{
def fact(n)
if n == 1 then
1
else
n * fact(n-1)
end
end
//}
文法:
def メソッド名 ['(' [arg0 ['=' default0]] ... [',' '*' rest_args [, post ...]] [',' key1: [val1]] ... [',' '*......f -(other); end # obj - other
# 単項プラス/マイナス
def +@; end # +obj
def -@; end # -obj
# 要素代入
def foo=(value); end # obj.foo = value
# [] と []=
def [](key); end # obj[key]
def []=(key, value......を参照してください。
//emlist[][ruby]{
class Foo
def foo
def bar
p :bar
end
end
def Foo.method_added(name)
puts "method \"#{name}\" was added"
end
end
obj = Foo.new
obj.bar rescue nil # => undefined method `bar' for #<Foo:0x4019eda4>
obj.foo # => meth...