Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Probe
- @next_probe_id = 0
- def self.next_probe_id
- @next_probe_id += 1
- end
- attr_reader :id
- def initialize
- @id = Probe.next_probe_id
- end
- def name
- @name ||= "Probe #{id}"
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement