Class: Attr

Inherits:
Parlour::Plugin
  • Object
show all
Defined in:
sorbet/parlour/attr.rb

Overview

Parlour type signature generator plugin for Homebrew DSL attributes.

Instance Method Summary collapse

Instance Method Details

#generate(root) ⇒ void

This method returns an undefined value.

Parameters:

  • root (Parlour::RbiGenerator::Namespace)


7
8
9
10
11
12
13
# File 'sorbet/parlour/attr.rb', line 7

def generate(root)
  tree = T.let([], T::Array[T.untyped])
  Homebrew::Parlour.ast_list.each do |node|
    tree += find_custom_attr(node)
  end
  process_custom_attr(tree, root)
end

#strictnessString?

Returns:



16
17
18
# File 'sorbet/parlour/attr.rb', line 16

def strictness
  "strict"
end