Sha256: 304224f6627479532362b8d942334f72b231aeb633333c4c8d4134332cc693fd
Contents?: true
Size: 508 Bytes
Versions: 4
Compression:
Stored size: 508 Bytes
Contents
require 'yard' class FattrHandler < YARD::Handlers::Ruby::AttributeHandler handles method_call(:fattr) namespace_only def process name = statement.parameters.first.jump(:tstring_content, :ident).source object = YARD::CodeObjects::MethodObject.new(namespace, name) register(object) parse_block(statement.last.last, :owner => object) # modify the object object.dynamic = true # add custom metadata to the object object['custom_field'] = 'Generated by Fattr' end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
import_everything-0.1.6 | yard_ext.rb |
import_everything-0.1.5 | yard_ext.rb |
import_everything-0.1.3 | yard_ext.rb |
import_everything-0.1.2 | yard_ext.rb |