Class: Code::Node::String::Part::Code
- Inherits:
-
Code::Node
- Object
- Code::Node
- Code::Node::String::Part::Code
- Defined in:
- lib/code/node/string.rb
Instance Method Summary collapse
- #evaluate(**args) ⇒ Object
-
#initialize(parsed) ⇒ Code
constructor
A new instance of Code.
Methods inherited from Code::Node
Constructor Details
#initialize(parsed) ⇒ Code
Returns a new instance of Code.
8 9 10 11 12 |
# File 'lib/code/node/string.rb', line 8 def initialize(parsed) return if parsed.blank? @code = Node::Code.new(parsed.presence) end |
Instance Method Details
#evaluate(**args) ⇒ Object
14 15 16 |
# File 'lib/code/node/string.rb', line 14 def evaluate(**args) @code&.evaluate(**args) || Object::Nothing.new end |