introducing class variable and typed arguments
This commit is contained in:
9
lib/parfait/variable.rb
Normal file
9
lib/parfait/variable.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
module Parfait
|
||||
class Variable < Object
|
||||
def initialize type , name , value = nil
|
||||
@type , @name , @value = type , name , value
|
||||
@value = 0 if @type == :int and value == nil
|
||||
end
|
||||
attributes [:type , :name, :value]
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user