mksc source (0.0.5) | 2010-01-11 22:11 |
mksc win32-binary (0.0.5) | 2010-01-11 22:12 |
class クラス名 : スーパークラス名 クラスメソッド定義 インスタンスメソッド定義 クラス変数定義 インスタンス変数定義 コンストラクタ定義 end
class SuperClass @@value = 0 @val0 = 1 @val1 = 2 def method_1( ) end end class MyClass @val2 = 3 def method_1( ) end def method_2( ) end end
class MyClass def initialize( a, b, c ) end end
オブジェクトを記憶する変数 = クラス名.new( コンストラクタに渡すArgument )
class MyClass def initialize( a, b, c ) end end p = MyClass.new( 1, 2, 3 )
class SuperClass def initialize( a ) end end class MyClass : SuperClass def initialize( a, b, c ) super( a ) end end p = MyClass.new( 1, 2, 3 )
対象クラス.super.@スーパークラスの変数 対象クラス.super.@スーパークラスのメソッド(Argument...)
superClassInstance = myClassInstance.super Console.println( superClassInstance) # => #<MyClass:instance>
[PageInfo]
LastUpdate: 2010-01-15 00:09:34, ModifiedBy: mikenekodx
[Permissions]
view:all, edit:members, delete/config:doc editors