Class: Tapioca::Compilers::Stanza

Inherits:
Dsl::Compiler
  • Object
show all
Defined in:
sorbet/tapioca/compilers/rubocop_cask_ast_stanza.rb

Constant Summary collapse

ConstantType =
type_member { { fixed: Module } }

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.gather_constantsEnumerable<Module>

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns:

[View source]

14
# File 'sorbet/tapioca/compilers/rubocop_cask_ast_stanza.rb', line 14

def self.gather_constants = [::RuboCop::Cask::AST::Stanza]

Instance Method Details

#decoratevoid

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

This method returns an undefined value.

[View source]

17
18
19
20
21
22
23
# File 'sorbet/tapioca/compilers/rubocop_cask_ast_stanza.rb', line 17

def decorate
  root.create_module(T.must(constant.name)) do |mod|
    ::RuboCop::Cask::Constants::STANZA_ORDER.each do |stanza|
      mod.create_method("#{stanza}?", return_type: "T::Boolean", class_method: false)
    end
  end
end