Method: CSDL::Processor#on_target

Defined in:
lib/csdl/processor.rb

#on_target(node) ⇒ String

Process :target nodes, ensuring the the given terminator value is a valid operator.

Examples:

node = s(:target, "fb.content")
CSDL::Processor.new.process(node) # => 'fb.content'

Parameters:

  • node (AST::Node)

    The :target node to be processed.

Returns:

  • (String)

    The first child, stringified.

Raises:

See Also:



223
224
225
226
227
# File 'lib/csdl/processor.rb', line 223

def on_target(node)
  target = node.children.first.to_s
  validate_target!(target)
  target
end