Sha256: b9774ff2d5ac099f60543a010b46fb017151ef30ab563578691425f10c6d09bd

Contents?: true

Size: 664 Bytes

Versions: 3

Compression:

Stored size: 664 Bytes

Contents

module YARD::MRuby::Handlers
  module C
    module Header
      class Base < YARD::Handlers::C::Base
        include YARD::MRuby::CodeObjects

        def header(path)
          # Remove include prefix
          path = path.gsub(/^.*include\//,'')

          headers[path] ||= begin
                              header = HeaderObject.new(HEADERS_ROOT, path)
                              register header
                              header
                            end


        end

        def headers
          globals.mruby_headers ||= {}
        end

      end

    end

    YARD::Handlers::Processor.register_handler_namespace :header, Header
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
yard-mruby-0.2.2 lib/yard/mruby/handlers/c/header/base.rb
yard-mruby-0.2.1 lib/yard/mruby/handlers/c/header/base.rb
yard-mruby-0.2.0 lib/yard/mruby/handlers/c/header/base.rb