Sha256: ebacff0f02f7730fae81de36687d9789d70275208818f2adea544b6834e80685
Contents?: true
Size: 627 Bytes
Versions: 3
Compression:
Stored size: 627 Bytes
Contents
require 'yard' module YARD module Handlers module Ruby module Legacy class ContextifyHandler < Base handles /\Acontextify\s/ def process nobj = ModuleObject.new(:root, 'Kernel') mscope = scope name = statement.tokens[2,1].to_s[1..-1] register MethodObject.new(nobj, name, mscope) do |o| o.visibility = :public o.source = statement.source o.signature = "def #{name}(&block)" o.parameters = [['&block', nil]] end end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems