summaryrefslogtreecommitdiff
path: root/vendor/bundle/ruby/3.4.0/gems/rouge-4.5.2/lib/rouge/demos/eiffel
blob: ec025cc9e104c8047b2adc4547cda1f45c9aee10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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