Class: Multicodecs::Registration
- Inherits:
-
Struct
- Object
- Struct
- Multicodecs::Registration
- Defined in:
- lib/multicodecs/registry.rb
Overview
rubocop:enable Style/MutableConstant
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#name ⇒ Object
Returns the value of attribute name.
-
#tag ⇒ Object
Returns the value of attribute tag.
Instance Method Summary collapse
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code
16 17 18 |
# File 'lib/multicodecs/registry.rb', line 16 def code @code end |
#name ⇒ Object
Returns the value of attribute name
16 17 18 |
# File 'lib/multicodecs/registry.rb', line 16 def name @name end |
#tag ⇒ Object
Returns the value of attribute tag
16 17 18 |
# File 'lib/multicodecs/registry.rb', line 16 def tag @tag end |
Instance Method Details
#==(other) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/multicodecs/registry.rb', line 21 def ==(other) return name == other if other.is_a?(String) return code == other if other.is_a?(Integer) eql?(other) end |
#eql?(other) ⇒ Boolean
28 29 30 |
# File 'lib/multicodecs/registry.rb', line 28 def eql?(other) other.is_a?(Registration) && other.name == name end |
#hash ⇒ Object
17 18 19 |
# File 'lib/multicodecs/registry.rb', line 17 def hash name.hash end |