Class: Lox::Write

Inherits:
Object
  • Object
show all
Defined in:
lib/lox/write.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(objects, output) ⇒ Write

Returns a new instance of Write.



8
9
10
11
# File 'lib/lox/write.rb', line 8

def initialize(objects, output)
  @objects = objects
  @output = output
end

Instance Attribute Details

#objectsObject (readonly)

Returns the value of attribute objects.



5
6
7
# File 'lib/lox/write.rb', line 5

def objects
  @objects
end

#outputObject (readonly)

Returns the value of attribute output.



6
7
8
# File 'lib/lox/write.rb', line 6

def output
  @output
end

Instance Method Details

#callObject



13
14
15
# File 'lib/lox/write.rb', line 13

def call
  objects.each(&block)
end