Skip to content

Commit

Permalink
Add Set a class as an interface page.
Browse files Browse the repository at this point in the history
  • Loading branch information
tamdaz committed Dec 22, 2024
1 parent 6a7f3fc commit 55c6935
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/get_started/3_set_a_class_as_an_interface.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```crystal
@[Cruml::Annotation::AsInterface]
abstract class Person
abstract def full_name : String
end
class Employee < Person
getter first_name : String
getter last_name : String
def initialize(@first_name : String, @last_name : String); end
def full_name : String
"#{@first_name} #{@last_name}"
end
end
```

0 comments on commit 55c6935

Please sign in to comment.