Class: SyntaxTree::Params::OptionalFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/syntax_tree.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, value) ⇒ OptionalFormatter



8419
8420
8421
8422
# File 'lib/syntax_tree.rb', line 8419

def initialize(name, value)
  @name = name
  @value = value
end

Instance Attribute Details

#nameObject (readonly)

Ident

the name of the parameter



8414
8415
8416
# File 'lib/syntax_tree.rb', line 8414

def name
  @name
end

#valueObject (readonly)

untyped

the value of the parameter



8417
8418
8419
# File 'lib/syntax_tree.rb', line 8417

def value
  @value
end

Instance Method Details

#commentsObject



8424
8425
8426
# File 'lib/syntax_tree.rb', line 8424

def comments
  []
end

#format(q) ⇒ Object



8428
8429
8430
8431
8432
# File 'lib/syntax_tree.rb', line 8428

def format(q)
  q.format(name)
  q.text(" = ")
  q.format(value)
end