Class: RBI::KwArg
Instance Attribute Summary collapse
-
#keyword ⇒ Object
readonly
: String.
Attributes inherited from Arg
Attributes inherited from Node
Instance Method Summary collapse
-
#==(other) ⇒ Object
: (Object? other) -> bool.
-
#initialize(keyword, value, loc: nil) ⇒ KwArg
constructor
: (String keyword, String value, ?loc: Loc?) -> void.
-
#to_s ⇒ Object
: -> String.
Methods inherited from Node
#compatible_with?, #detach, #merge_with, #parent_conflict_tree, #parent_scope, #print, #rbs_print, #rbs_string, #replace, #satisfies_version?, #string
Constructor Details
#initialize(keyword, value, loc: nil) ⇒ KwArg
: (String keyword, String value, ?loc: Loc?) -> void
809 810 811 812 |
# File 'lib/rbi/model.rb', line 809 def initialize(keyword, value, loc: nil) super(value, loc: loc) @keyword = keyword end |
Instance Attribute Details
#keyword ⇒ Object (readonly)
: String
806 807 808 |
# File 'lib/rbi/model.rb', line 806 def keyword @keyword end |
Instance Method Details
#==(other) ⇒ Object
: (Object? other) -> bool
815 816 817 |
# File 'lib/rbi/model.rb', line 815 def ==(other) KwArg === other && value == other.value && keyword == other.keyword end |
#to_s ⇒ Object
: -> String
820 821 822 |
# File 'lib/rbi/model.rb', line 820 def to_s "#{keyword}: #{value}" end |