Class: Prism::LambdaNode

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#after_body_procObject (readonly)

Returns the value of attribute after_body_proc.



21
22
23
# File 'lib/sirop/prism_ext.rb', line 21

def after_body_proc
  @after_body_proc
end

Instance Method Details

#after_body(&b) ⇒ Object



37
38
39
# File 'lib/sirop/prism_ext.rb', line 37

def after_body(&b)
  @after_body_proc = b
end

#inject_parameters(params) ⇒ void

This method returns an undefined value.

Parameters:

  • params (String)

    injected parameters



25
26
27
28
29
30
31
32
33
34
35
# File 'lib/sirop/prism_ext.rb', line 25

def inject_parameters(params)
  if parameters
    if parameters.parameters
      parameters.parameters.injected_prefix = Sirop::Injection.new(params)
    else
      parameters.injected_parameters = Sirop::Injection.new(params)
    end
  else
    instance_variable_set(:@parameters, Sirop::Injection.new("(#{params})"))
  end
end