Class: Verneuil::Method

Inherits:
Struct
  • Object
show all
Defined in:
lib/verneuil/method.rb

Overview

Represents a method that can be called.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#addressObject

Returns the value of attribute address

Returns:

  • (Object)

    the current value of address



4
5
6
# File 'lib/verneuil/method.rb', line 4

def address
  @address
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



4
5
6
# File 'lib/verneuil/method.rb', line 4

def name
  @name
end

#receiverObject

Returns the value of attribute receiver

Returns:

  • (Object)

    the current value of receiver



4
5
6
# File 'lib/verneuil/method.rb', line 4

def receiver
  @receiver
end

Instance Method Details

#invoke(process, recv_obj) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/verneuil/method.rb', line 5

def invoke(process, recv_obj)
  if receiver
    process.call address, recv_obj
  else
    process.call address
  end
  throw :verneuil_code
end