Sha256: 237c609f7b0de92a8910d2c80e9b003cdc48571e031285b6a44b00429ebef7a3

Contents?: true

Size: 597 Bytes

Versions: 6

Compression:

Stored size: 597 Bytes

Contents

module YARD
  module Generators
    class MethodMissingGenerator < Base
      before_generate :has_method_missing?
       
      def sections_for(object) 
        [:header, [G(MethodGenerator)]] 
      end
      
      protected
      
      def has_method_missing?
        method_missing_method ? true : false 
      end
      
      def method_missing_method
        current_object.meths.find {|o| o.name == :method_missing && o.scope == :instance }
      end
      
      def method_missing_method_inherited?
        method_missing_method.namespace != current_object
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
yard-0.2.3.5 lib/yard/generators/method_missing_generator.rb
yard-0.2.3.4 lib/yard/generators/method_missing_generator.rb
yard-0.2.3.2 lib/yard/generators/method_missing_generator.rb
yard-0.2.3.3 lib/yard/generators/method_missing_generator.rb
yard-0.2.2 lib/yard/generators/method_missing_generator.rb
yard-0.2.3 lib/yard/generators/method_missing_generator.rb