Adding the new Eiffel example.
This commit is contained in:
parent
9284732a28
commit
b651a424f1
1 changed files with 30 additions and 0 deletions
30
demo/kitchen-sink/docs/eiffel.e
Normal file
30
demo/kitchen-sink/docs/eiffel.e
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
note
|
||||
description: "Represents a person."
|
||||
|
||||
class
|
||||
PERSON
|
||||
|
||||
create
|
||||
make, make_unknown
|
||||
|
||||
feature {NONE} -- Creation
|
||||
|
||||
make (a_name: like name)
|
||||
-- Create a person with `a_name' as `name'.
|
||||
do
|
||||
name := a_name
|
||||
ensure
|
||||
name = a_name
|
||||
end
|
||||
|
||||
make_unknown
|
||||
do ensure
|
||||
name = Void
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
name: detachable STRING
|
||||
-- Full name or Void if unknown.
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue