Class: Irbs::Core
- Inherits:
-
Object
- Object
- Irbs::Core
- Defined in:
- lib/irbs/core.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(config) ⇒ Core
constructor
A new instance of Core.
Constructor Details
#initialize(config) ⇒ Core
Returns a new instance of Core.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/irbs/core.rb', line 11 def initialize(config) @config = config # YARD::Parser::SourceParser.after_parse_file do |parser| # next unless parser.file == 'example/app.rb' # $parser = parser.instance_variable_get(:@parser) # end YARD::Tags::Library.define_tag('Signature', :sig) YARD::Tags::Library.define_tag('Raw rbs code', :rbs) YARD::Parser::SourceParser.parse(config.paths) YARD::Registry.load_all end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
8 9 10 |
# File 'lib/irbs/core.rb', line 8 def config @config end |
Instance Method Details
#generate ⇒ Object
27 28 29 30 31 |
# File 'lib/irbs/core.rb', line 27 def generate config.stdout.puts("# Irbs #{VERSION}") config.stdout.puts RbsGenerator.new(registry.root, config).generate end |