Skip to content

Commit

Permalink
Merge pull request #2174 from Shopify/at-class-self-doc
Browse files Browse the repository at this point in the history
Document a few details about `class`
  • Loading branch information
soutaro authored Jan 25, 2025
2 parents c04a6b0 + 091156c commit e5a4329
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,9 @@ The following `class`/`instance` types are allowed.
class Foo
attr_reader parent: class
def foo: () -> instance
def foo: () -> instance # behaves like `self` in this context
def self?.bar: () -> instance # behaves like `class` for `def self.bar()` and `self` for `def bar()`
@@foos: Array[instance]
Expand Down

0 comments on commit e5a4329

Please sign in to comment.