Class: CutePrint::RubyParser::MethodCall Private

Inherits:
Object
  • Object
show all
Includes:
WrapsSexp
Defined in:
lib/cute_print/ruby_parser/method_call.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

API:

  • private

Class Method Summary collapse

Instance Method Summary collapse

Methods included from WrapsSexp

#initialize, #to_ruby

Class Method Details

.call?(sexp) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

API:

  • private



16
17
18
# File 'lib/cute_print/ruby_parser/method_call.rb', line 16

def self.call?(sexp)
  sexp[0] == :iter && sexp[1][0] == :call
end

.call_to_method?(sexp, method_name) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

API:

  • private



12
13
14
# File 'lib/cute_print/ruby_parser/method_call.rb', line 12

def self.call_to_method?(sexp, method_name)
  call?(sexp) && sexp[1][2] == method_name
end

Instance Method Details

#blockObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



20
21
22
# File 'lib/cute_print/ruby_parser/method_call.rb', line 20

def block
  Block.new(@sexp[3])
end