fix ruby variables

This commit is contained in:
Torsten Ruger
2018-07-20 14:22:26 +03:00
parent f4402ba30f
commit 98788b52d3
5 changed files with 53 additions and 11 deletions

19
lib/vool/assignment.rb Normal file
View File

@ -0,0 +1,19 @@
module Vool
class Assignment < Statement
attr_reader :name , :value
def initialize(name , value )
@name , @value = name , value
end
def each(&block)
block.call(self)
@value.each(&block)
end
def to_s(depth = 0)
at_depth(depth , "#{@name} = #{@value}")
end
end
end