Class: Foxtail::Bundle::Parser::AST::NamedArgument

Inherits:
Data
  • Object
show all
Defined in:
lib/foxtail/bundle/parser/ast.rb,
lib/foxtail/bundle/parser/ast.rb

Overview

Named argument in function calls (key: value)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, value:) ⇒ NamedArgument

Returns a new instance of NamedArgument.

Parameters:

  • name (#to_s)

    The argument name (will be converted to String)

  • value

    The argument value expression



81
# File 'lib/foxtail/bundle/parser/ast.rb', line 81

def initialize(name:, value:) = super(name: name.to_s, value:)

Instance Attribute Details

#nameObject (readonly)

String

The argument name



78
79
80
# File 'lib/foxtail/bundle/parser/ast.rb', line 78

def name
  @name
end

#valueObject (readonly)

The argument value expression



78
79
80
# File 'lib/foxtail/bundle/parser/ast.rb', line 78

def value
  @value
end