Sha256: c8cfb45cec39e04d74b2922f6dd50dbb89edf8717d350696e7a3dd0d9c510482

Contents?: true

Size: 429 Bytes

Versions: 14

Compression:

Stored size: 429 Bytes

Contents

require_relative "block"
require_relative "wraps_sexp"

module CutePrint
  class RubyParser

    # @api private
    class MethodCall

      include WrapsSexp

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

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

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

    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
cute_print-1.4.0 lib/cute_print/ruby_parser/method_call.rb
cute_print-1.3.0 lib/cute_print/ruby_parser/method_call.rb
cute_print-1.2.0 lib/cute_print/ruby_parser/method_call.rb
cute_print-1.1.4 lib/cute_print/ruby_parser/method_call.rb
cute_print-1.1.3 lib/cute_print/ruby_parser/method_call.rb
cute_print-1.1.2 lib/cute_print/ruby_parser/method_call.rb
cute_print-1.1.1 lib/cute_print/ruby_parser/method_call.rb
cute_print-1.1.0 lib/cute_print/ruby_parser/method_call.rb
cute_print-1.0.1 lib/cute_print/ruby_parser/method_call.rb
cute_print-1.0.0 lib/cute_print/ruby_parser/method_call.rb
cute_print-0.4.0 lib/cute_print/ruby_parser/method_call.rb
cute_print-0.3.0 lib/cute_print/ruby_parser/method_call.rb
cute_print-0.2.0 lib/cute_print/ruby_parser/method_call.rb
cute_print-0.1.0 lib/cute_print/ruby_parser/method_call.rb