Sha256: 821c843fb0e7ecfb7a249d6858e373c11bee5fbd84434a8ad5b34bb8e165a79d
Contents?: true
Size: 772 Bytes
Versions: 2
Compression:
Stored size: 772 Bytes
Contents
require "yard" module Lookbook class Parser YARDOC_FILE_PATH = Rails.root.join("tmp/storage/.yardoc").to_s def initialize(paths) @paths = paths.map { |p| "#{p}/**/*_preview.rb" } YARD::Registry.yardoc_file = YARDOC_FILE_PATH end def parse YARD::Registry.clear YARD::Registry.lock_for_writing do YARD.parse(@paths) YARD::Registry.save(false, YARDOC_FILE_PATH) end end def get_code_object(path) registry = YARD::RegistryStore.new registry.load!(YARDOC_FILE_PATH) registry.get(path) end class << self def define_tags YARD::Tags::Library.define_tag("Hidden status", :hidden) YARD::Tags::Library.define_tag("Label", :label) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lookbook-0.3.5 | lib/lookbook/parser.rb |
lookbook-0.3.4 | lib/lookbook/parser.rb |