Class: CGenerator::MethodPrototype::RbScanArgsSpec

Inherits:
Object
  • Object
show all
Defined in:
lib/cgen/cgen.rb

Instance Method Summary collapse

Constructor Details

#initialize(bl) ⇒ RbScanArgsSpec

Returns a new instance of RbScanArgsSpec.



1786
1787
1788
1789
1790
1791
# File 'lib/cgen/cgen.rb', line 1786

def initialize bl
  @required = @optional = @typecheck = @default = @rest = @block = nil
  if bl
    instance_eval(&bl)
  end
end

Instance Method Details

#block(arg) ⇒ Object



1798
# File 'lib/cgen/cgen.rb', line 1798

def block(arg);           @block = arg;         end

#default(arg) ⇒ Object



1796
# File 'lib/cgen/cgen.rb', line 1796

def default(arg);         @default = arg;       end

#get_blockObject



1805
# File 'lib/cgen/cgen.rb', line 1805

def get_block;            @block;               end

#get_defaultObject



1803
# File 'lib/cgen/cgen.rb', line 1803

def get_default;          @default;             end

#get_optionalObject



1801
# File 'lib/cgen/cgen.rb', line 1801

def get_optional;         @optional;            end

#get_requiredObject



1800
# File 'lib/cgen/cgen.rb', line 1800

def get_required;         @required;            end

#get_restObject



1804
# File 'lib/cgen/cgen.rb', line 1804

def get_rest;             @rest;                end

#get_typecheckObject



1802
# File 'lib/cgen/cgen.rb', line 1802

def get_typecheck;        @typecheck;           end

#optional(*args) ⇒ Object



1794
# File 'lib/cgen/cgen.rb', line 1794

def optional(*args);      @optional = args;     end

#required(*args) ⇒ Object



1793
# File 'lib/cgen/cgen.rb', line 1793

def required(*args);      @required = args;     end

#rest(arg) ⇒ Object



1797
# File 'lib/cgen/cgen.rb', line 1797

def rest(arg);            @rest = arg;          end

#typecheck(arg) ⇒ Object



1795
# File 'lib/cgen/cgen.rb', line 1795

def typecheck(arg);       @typecheck = arg;     end