Class: Multibases::Registration
- Inherits:
-
Struct
- Object
- Struct
- Multibases::Registration
- Defined in:
- lib/multibases/registry.rb
Overview
rubocop:enable Style/MutableConstant
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#encoding ⇒ Object
Returns the value of attribute encoding.
-
#engine ⇒ Object
Returns the value of attribute engine.
Instance Method Summary collapse
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code
8 9 10 |
# File 'lib/multibases/registry.rb', line 8 def code @code end |
#encoding ⇒ Object
Returns the value of attribute encoding
8 9 10 |
# File 'lib/multibases/registry.rb', line 8 def encoding @encoding end |
#engine ⇒ Object
Returns the value of attribute engine
8 9 10 |
# File 'lib/multibases/registry.rb', line 8 def engine @engine end |
Instance Method Details
#==(other) ⇒ Object
13 14 15 16 17 |
# File 'lib/multibases/registry.rb', line 13 def ==(other) return [encoding, code].include?(other) if other.is_a?(String) eql?(other) end |
#eql?(other) ⇒ Boolean
19 20 21 |
# File 'lib/multibases/registry.rb', line 19 def eql?(other) other.is_a?(Registration) && other.encoding == encoding end |
#hash ⇒ Object
9 10 11 |
# File 'lib/multibases/registry.rb', line 9 def hash encoding.hash end |