Class: Irbs::RbsGenerator

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/irbs/rbs_generator.rb

Instance Method Summary collapse

Constructor Details

#initialize(namespace_obj, config) ⇒ RbsGenerator

Returns a new instance of RbsGenerator.



11
12
13
14
15
# File 'lib/irbs/rbs_generator.rb', line 11

def initialize(namespace_obj, config)
  @obj = namespace_obj
  @config = config
  @stdout = config.stdout
end

Instance Method Details

#generateObject



18
19
20
21
22
23
24
# File 'lib/irbs/rbs_generator.rb', line 18

def generate
  writeout unless obj.root?

  child_namespaces.each do
    self.class.new(_1, config).generate
  end
end