Class: Scope::Variable

Inherits:
Object show all
Defined in:
lib/scope.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type = Ikra::Types::UnionType.new) ⇒ Variable

Returns a new instance of Variable.



47
48
49
50
51
# File 'lib/scope.rb', line 47

def initialize(type = Ikra::Types::UnionType.new)
    @type = type
    @read = false
    @written = false
end

Instance Attribute Details

#readObject

Returns the value of attribute read.



44
45
46
# File 'lib/scope.rb', line 44

def read
  @read
end

#typeObject (readonly)

Returns the value of attribute type.



43
44
45
# File 'lib/scope.rb', line 43

def type
  @type
end

#writtenObject

Returns the value of attribute written.



45
46
47
# File 'lib/scope.rb', line 45

def written
  @written
end