Class: Ikra::Symbolic::ArrayMapCommand

Inherits:
Object
  • Object
show all
Includes:
ArrayCommand
Defined in:
lib/symbolic/visitor.rb,
lib/symbolic/symbolic.rb

Instance Attribute Summary collapse

Attributes included from ArrayCommand

#unique_id

Instance Method Summary collapse

Methods included from ArrayCommand

#[], #ast, #block_parameter_names, #execute, #externals, #lexical_externals, #pmap, #to_command

Constructor Details

#initialize(target, block) ⇒ ArrayMapCommand

Returns a new instance of ArrayMapCommand.



148
149
150
151
152
153
# File 'lib/symbolic/symbolic.rb', line 148

def initialize(target, block)
    super()

    @target = target
    @block = block
end

Instance Attribute Details

#targetObject (readonly)

Returns the value of attribute target.



146
147
148
# File 'lib/symbolic/symbolic.rb', line 146

def target
  @target
end

Instance Method Details

#accept(visitor) ⇒ Object



10
11
12
# File 'lib/symbolic/visitor.rb', line 10

def accept(visitor)
    visitor.visit_array_map_command(self)
end

#sizeObject



155
156
157
# File 'lib/symbolic/symbolic.rb', line 155

def size
    @target.size
end