class MinispecMetadata::Tag
Public Class Methods
new(tag_string)
click to toggle source
# File lib/minispec-metadata/tags.rb, line 77 def initialize(tag_string) @tag_string = tag_string end
Public Instance Methods
exclusive?()
click to toggle source
# File lib/minispec-metadata/tags.rb, line 81 def exclusive? @tag_string.start_with? '~' end
inclusive?()
click to toggle source
# File lib/minispec-metadata/tags.rb, line 85 def inclusive? !exclusive? end
key()
click to toggle source
# File lib/minispec-metadata/tags.rb, line 89 def key @key ||= @tag_string[/\w+/] end
value()
click to toggle source
# File lib/minispec-metadata/tags.rb, line 93 def value @value ||= @tag_string.split(':').last if value? end
value?()
click to toggle source
# File lib/minispec-metadata/tags.rb, line 97 def value? !!@tag_string[/:/] end