Class: Lite::Uxid::Irreversible::Base
- Inherits:
-
Object
- Object
- Lite::Uxid::Irreversible::Base
- Includes:
- Base
- Defined in:
- lib/lite/uxid/irreversible/base.rb
Instance Attribute Summary collapse
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
Class Method Summary collapse
Instance Method Summary collapse
- #decode ⇒ Object
-
#initialize(opts = {}) ⇒ Base
constructor
A new instance of Base.
Methods included from Base
Constructor Details
#initialize(opts = {}) ⇒ Base
Returns a new instance of Base.
12 13 14 |
# File 'lib/lite/uxid/irreversible/base.rb', line 12 def initialize(opts = {}) @opts = opts end |
Instance Attribute Details
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
10 11 12 |
# File 'lib/lite/uxid/irreversible/base.rb', line 10 def opts @opts end |
Class Method Details
.decode(opts = {}) ⇒ Object
21 22 23 24 |
# File 'lib/lite/uxid/irreversible/base.rb', line 21 def self.decode(opts = {}) klass = new(opts) klass.decode end |
.encode(opts = {}) ⇒ Object
16 17 18 19 |
# File 'lib/lite/uxid/irreversible/base.rb', line 16 def self.encode(opts = {}) klass = new(opts) klass.encode end |
Instance Method Details
#decode ⇒ Object
26 27 28 |
# File 'lib/lite/uxid/irreversible/base.rb', line 26 def decode raise "#{coder_class} does not support decoding" end |