Class: Tapioca::Compilers::Dsl::Base

Inherits:
Object
  • Object
show all
Extended by:
T::Helpers, T::Sig
Defined in:
lib/tapioca/compilers/dsl/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBase

Returns a new instance of Base.



19
20
21
# File 'lib/tapioca/compilers/dsl/base.rb', line 19

def initialize
  @processable_constants = T.let(Set.new(gather_constants), T::Set[Module])
end

Instance Attribute Details

#processable_constantsObject (readonly)

Returns the value of attribute processable_constants.



16
17
18
# File 'lib/tapioca/compilers/dsl/base.rb', line 16

def processable_constants
  @processable_constants
end

Instance Method Details

#decorate(root, constant) ⇒ Object



37
# File 'lib/tapioca/compilers/dsl/base.rb', line 37

def decorate(root, constant); end

#gather_constantsObject



40
# File 'lib/tapioca/compilers/dsl/base.rb', line 40

def gather_constants; end

#handles?(constant) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/tapioca/compilers/dsl/base.rb', line 24

def handles?(constant)
  processable_constants.include?(constant)
end