singleton method Struct.members
members -> [Symbol]-
(このメソッドは Struct の下位クラスにのみ定義されています) 構造体のメンバの名前(Symbol)の配列を返します。
Foo = Struct.new(:foo, :bar) p Foo.members # => [:foo, :bar]
class Struct
members -> [Symbol](このメソッドは Struct の下位クラスにのみ定義されています) 構造体のメンバの名前(Symbol)の配列を返します。
Foo = Struct.new(:foo, :bar) p Foo.members # => [:foo, :bar]