Sha256: f9f123eb4eb35c11b166692205d99baed1285052db7855b000a4d3d8a62e9776

Contents?: true

Size: 587 Bytes

Versions: 13

Compression:

Stored size: 587 Bytes

Contents

# typed: true
module Parlour
  # The RBS generator.
  class RbsGenerator < Generator  
    def initialize(**hash)
      super
      @root = RbsGenerator::Namespace.new(self)
    end

    sig { overridable.returns(RbsGenerator::Namespace) }
    # The root {Namespace} of this generator.
    # @return [Namespace]
    attr_reader :root
    
    sig { overridable.returns(String) }
    # Returns the complete contents of the generated RBS file as a string.
    #
    # @return [String] The generated RBS file
    def rbs
      root.generate_rbs(0, options).join("\n")
    end
  end
  end
  

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
parlour-9.0.0 lib/parlour/rbs_generator.rb
parlour-8.1.0 lib/parlour/rbs_generator.rb
parlour-8.0.0 lib/parlour/rbs_generator.rb
parlour-7.0.0 lib/parlour/rbs_generator.rb
parlour-6.0.1 lib/parlour/rbs_generator.rb
parlour-6.0.0 lib/parlour/rbs_generator.rb
parlour-5.0.0 lib/parlour/rbs_generator.rb
parlour-5.0.0.beta.6 lib/parlour/rbs_generator.rb
parlour-5.0.0.beta.5 lib/parlour/rbs_generator.rb
parlour-5.0.0.beta.4 lib/parlour/rbs_generator.rb
parlour-5.0.0.beta.3 lib/parlour/rbs_generator.rb
parlour-5.0.0.beta.2 lib/parlour/rbs_generator.rb
parlour-5.0.0.beta.1 lib/parlour/rbs_generator.rb