Class: ModularizationStatistics::Tag

Inherits:
T::Struct
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/modularization_statistics/tag.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.for(key, value) ⇒ Object



15
16
17
18
19
20
# File 'lib/modularization_statistics/tag.rb', line 15

def self.for(key, value)
  new(
    key: key,
    value: value
  )
end

Instance Method Details

#==(other) ⇒ Object



23
24
25
26
# File 'lib/modularization_statistics/tag.rb', line 23

def ==(other)
  other.key == self.key &&
    other.value == self.value
end

#to_sObject



10
11
12
# File 'lib/modularization_statistics/tag.rb', line 10

def to_s
  "#{key}:#{value}"
end