Class: RBI::Arg
- Extended by:
- T::Sig
- Defined in:
- lib/rbi/model.rb,
lib/rbi/printer.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Node
Instance Method Summary collapse
- #==(other) ⇒ Object
- #accept_printer(v) ⇒ Object
-
#initialize(value, loc: nil) ⇒ Arg
constructor
A new instance of Arg.
- #to_s ⇒ Object
Methods inherited from Node
#compatible_with?, #detach, #group_kind, #merge_with, #oneline?, #parent_conflict_tree, #parent_scope, #print, #print_blank_line_before, #replace, #string
Constructor Details
#initialize(value, loc: nil) ⇒ Arg
Returns a new instance of Arg.
972 973 974 975 |
# File 'lib/rbi/model.rb', line 972 def initialize(value, loc: nil) super(loc: loc) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
964 965 966 |
# File 'lib/rbi/model.rb', line 964 def value @value end |
Instance Method Details
#==(other) ⇒ Object
978 979 980 |
# File 'lib/rbi/model.rb', line 978 def ==(other) Arg === other && value == other.value end |
#accept_printer(v) ⇒ Object
583 584 585 |
# File 'lib/rbi/printer.rb', line 583 def accept_printer(v) v.print(value) end |
#to_s ⇒ Object
983 984 985 |
# File 'lib/rbi/model.rb', line 983 def to_s value end |