Sha256: 5c2982d5adcf38c9707a37386706aa5880aa1f430d835616ba2fa65147e28344
Contents?: true
Size: 689 Bytes
Versions: 20
Compression:
Stored size: 689 Bytes
Contents
module RBS module AST class Comment attr_reader :string attr_reader :location def initialize(string:, location:) @string = string @location = location end def ==(other) other.is_a?(Comment) && other.string == string end alias eql? == def hash self.class.hash ^ string.hash end def to_json(*a) { string: string, location: location }.to_json(*a) end def concat(string:, location:) @string.concat string if loc = @location loc.concat location else @location = location end self end end end end
Version data entries
20 entries across 20 versions & 1 rubygems