Sha256: b8cfc2cb19c4565feaec6a7edae2bcb690a2422cbc1342f71d48265d5c126d97
Contents?: true
Size: 455 Bytes
Versions: 11
Compression:
Stored size: 455 Bytes
Contents
require_relative "ruby_parser" module CutePrint # @api private class SourceLabel def initialize(block, method) @block = block @method = method end def to_s "#{block_code} is " end private def block_code ruby_parser = RubyParser.from_block(@block) parsed_code = ruby_parser.parse method_call = parsed_code.first_call_to_method(@method) method_call.block.to_ruby end end end
Version data entries
11 entries across 11 versions & 1 rubygems