lib/tapioca/dsl/compiler.rb in tapioca-0.14.3 vs lib/tapioca/dsl/compiler.rb in tapioca-0.14.4

- old
+ new

@@ -20,10 +20,13 @@ attr_reader :constant sig { returns(RBI::Tree) } attr_reader :root + sig { returns(T::Hash[String, T.untyped]) } + attr_reader :options + class << self extend T::Sig sig { params(constant: Module).returns(T::Boolean) } def handles?(constant) @@ -58,14 +61,22 @@ T.nilable(T::Enumerable[Module]), ) end end - sig { params(pipeline: Tapioca::Dsl::Pipeline, root: RBI::Tree, constant: ConstantType).void } - def initialize(pipeline, root, constant) + sig do + params( + pipeline: Tapioca::Dsl::Pipeline, + root: RBI::Tree, + constant: ConstantType, + options: T::Hash[String, T.untyped], + ).void + end + def initialize(pipeline, root, constant, options = {}) @pipeline = pipeline @root = root @constant = constant + @options = options @errors = T.let([], T::Array[String]) end sig { params(compiler_name: String).returns(T::Boolean) } def compiler_enabled?(compiler_name)