Sha256: cbddb019b1812b112e6d1ff84942605e1eb6c7b102f837203c539d619a308ccb
Contents?: true
Size: 960 Bytes
Versions: 12
Compression:
Stored size: 960 Bytes
Contents
class Code class Node class FunctionArgument < Node def initialize(argument) if argument.key?(:regular) @argument = ::Code::Node::RegularFunctionArgument.new(argument.fetch(:regular)) elsif argument.key?(:keyword) @argument = ::Code::Node::KeywordFunctionArgument.new(argument.fetch(:keyword)) else raise NotImplementedError.new(argument.inspect) end end def evaluate(**args) @argument.evaluate(**args) end def splat? @argument.splat? end def keyword_splat? @argument.keyword_splat? end def name @argument.name end def block? @argument.block? end def regular? @argument.is_a?(::Code::Node::RegularFunctionArgument) end def keyword? @argument.is_a?(::Code::Node::KeywordFunctionArgument) end end end end
Version data entries
12 entries across 12 versions & 2 rubygems