Class: ImgToScript::AbstractToken::Parentheses

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

Overview

Wrap an expression into parentheses.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expression:) ⇒ Parentheses

Returns a new instance of Parentheses.



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

def initialize(expression:, **)
  @type = AbsTokenType::PARENTHESES
  @expression = expression

  super
end

Instance Attribute Details

#expressionObject (readonly)

Returns the value of attribute expression.



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

def expression
  @expression
end