mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
14 lines
256 B
Ruby
14 lines
256 B
Ruby
|
# Author:: Nathaniel Talbott.
|
||
|
# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
|
||
|
# License:: Ruby license.
|
||
|
|
||
|
class Adder
|
||
|
def initialize(number)
|
||
|
@number = number
|
||
|
end
|
||
|
def add(number)
|
||
|
return @number + number
|
||
|
end
|
||
|
end
|
||
|
|