Class: SyntaxTree::Params::OptionalFormatter
- Inherits:
-
Object
- Object
- SyntaxTree::Params::OptionalFormatter
- Defined in:
- lib/syntax_tree.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
- Ident
-
the name of the parameter.
-
#value ⇒ Object
readonly
- untyped
-
the value of the parameter.
Instance Method Summary collapse
- #comments ⇒ Object
- #format(q) ⇒ Object
-
#initialize(name, value) ⇒ OptionalFormatter
constructor
A new instance of OptionalFormatter.
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
#name ⇒ Object (readonly)
- Ident
-
the name of the parameter
8414 8415 8416 |
# File 'lib/syntax_tree.rb', line 8414 def name @name end |
#value ⇒ Object (readonly)
- untyped
-
the value of the parameter
8417 8418 8419 |
# File 'lib/syntax_tree.rb', line 8417 def value @value end |
Instance Method Details
#comments ⇒ Object
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 |