Class: Rjq::BytecodeFunctionDefinition

Inherits:
Struct
  • Object
show all
Defined in:
lib/rjq/opcodes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



44
45
46
# File 'lib/rjq/opcodes.rb', line 44

def body
  @body
end

#closureObject

Returns the value of attribute closure

Returns:

  • (Object)

    the current value of closure



44
45
46
# File 'lib/rjq/opcodes.rb', line 44

def closure
  @closure
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



44
45
46
# File 'lib/rjq/opcodes.rb', line 44

def name
  @name
end

#paramsObject

Returns the value of attribute params

Returns:

  • (Object)

    the current value of params



44
45
46
# File 'lib/rjq/opcodes.rb', line 44

def params
  @params
end

Instance Method Details

#with_closure(functions) ⇒ Object



45
46
47
# File 'lib/rjq/opcodes.rb', line 45

def with_closure(functions)
  self.class.new(name: name, params: params, body: body, closure: functions)
end