introducing class variable and typed arguments

This commit is contained in:
Torsten Ruger
2015-09-27 14:30:41 +03:00
parent 94c08f7129
commit 18935366fe
8 changed files with 37 additions and 15 deletions

9
lib/parfait/variable.rb Normal file
View 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