class Atomy::Method::Branch

Attributes

arguments[R]
body[R]
default_arguments[R]
name[RW]
post_arguments[R]
proc_argument[R]
receiver[R]
splat_argument[R]

Public Class Methods

new(receiver = nil, arguments = [], default_arguments = [], splat_argument = nil, post_arguments = [], proc_argument = nil, &body) click to toggle source
# File lib/atomy/method.rb, line 40
def initialize(receiver = nil, arguments = [], default_arguments = [],
               splat_argument = nil, post_arguments = [],
               proc_argument = nil, &body)
  @body = body.block
  @receiver = receiver
  @arguments = arguments
  @default_arguments = default_arguments
  @splat_argument = splat_argument
  @post_arguments = post_arguments
  @proc_argument = proc_argument
end

Public Instance Methods

as_method() click to toggle source
# File lib/atomy/method.rb, line 77
def as_method
  Rubinius::BlockEnvironment::AsMethod.new(@body)
end
default_arguments_count() click to toggle source
# File lib/atomy/method.rb, line 56
def default_arguments_count
  @default_arguments.size
end
for_method!() click to toggle source
# File lib/atomy/method.rb, line 68
def for_method!
  @method = true
  self
end
method?() click to toggle source
# File lib/atomy/method.rb, line 73
def method?
  @method
end
post_arguments_count() click to toggle source
# File lib/atomy/method.rb, line 60
def post_arguments_count
  @post_arguments.size
end
pre_arguments_count() click to toggle source
# File lib/atomy/method.rb, line 52
def pre_arguments_count
  @arguments.size
end
splat_index() click to toggle source
# File lib/atomy/method.rb, line 64
def splat_index
  @arguments.size + @default_arguments.size if @splat_argument
end