Sha256: 3bdfba909e373f3fcadb8257a7962331d83a48718da9291c94258461df235308
Contents?: true
Size: 447 Bytes
Versions: 14
Compression:
Stored size: 447 Bytes
Contents
class SpecTag attr_accessor :tag, :comment, :description def initialize(string=nil) parse(string) if string end def parse(string) m = /^([^()#:]+)(\(([^)]+)?\))?:(.*)/.match string @tag, @comment, @description = m.values_at(1, 3, 4) if m end def to_s "#{@tag}#{ "(#{@comment})" if @comment }:#{@description}" end def ==(o) @tag == o.tag and @comment == o.comment and @description == o.description end end
Version data entries
14 entries across 14 versions & 1 rubygems