Class: ImgToScript::AbstractToken::LoopBegin

Inherits:
ImgToScript::AbstractToken show all
Defined in:
lib/img_to_script/abstract_token/loop_begin.rb

Overview

Begin a loop.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(var_name:, start_value:, end_value:) ⇒ LoopBegin

Returns a new instance of LoopBegin.



11
12
13
14
15
16
17
18
# File 'lib/img_to_script/abstract_token/loop_begin.rb', line 11

def initialize(var_name:, start_value:, end_value:, **)
  @type = AbsTokenType::LOOP_BEGIN
  @var_name = var_name
  @start_value = start_value
  @end_value = end_value

  super
end

Instance Attribute Details

#end_valueObject (readonly)

Returns the value of attribute end_value.



9
10
11
# File 'lib/img_to_script/abstract_token/loop_begin.rb', line 9

def end_value
  @end_value
end

#start_valueObject (readonly)

Returns the value of attribute start_value.



9
10
11
# File 'lib/img_to_script/abstract_token/loop_begin.rb', line 9

def start_value
  @start_value
end

#var_nameObject (readonly)

Returns the value of attribute var_name.



9
10
11
# File 'lib/img_to_script/abstract_token/loop_begin.rb', line 9

def var_name
  @var_name
end