Class: Etwin::Twinoid::TwinoidUserId
- Inherits:
-
Object
- Object
- Etwin::Twinoid::TwinoidUserId
- Extended by:
- T::Helpers, T::Sig
- Defined in:
- lib/etwin/twinoid/twinoid_user_id.rb
Overview
A valid Twinoid user id
Instance Method Summary collapse
- #==(other) ⇒ Object
- #as_json ⇒ Object
- #hash ⇒ Object
-
#initialize(inner) ⇒ TwinoidUserId
constructor
A new instance of TwinoidUserId.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(inner) ⇒ TwinoidUserId
Returns a new instance of TwinoidUserId.
21 22 23 24 |
# File 'lib/etwin/twinoid/twinoid_user_id.rb', line 21 def initialize(inner) @inner = T.let(inner.freeze, String) freeze end |
Instance Method Details
#==(other) ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/etwin/twinoid/twinoid_user_id.rb', line 27 def ==(other) case other when TwinoidUserId @inner == other.inner else false end end |
#as_json ⇒ Object
47 48 49 |
# File 'lib/etwin/twinoid/twinoid_user_id.rb', line 47 def as_json @inner end |
#hash ⇒ Object
37 38 39 |
# File 'lib/etwin/twinoid/twinoid_user_id.rb', line 37 def hash @inner.hash end |
#inspect ⇒ Object
52 53 54 |
# File 'lib/etwin/twinoid/twinoid_user_id.rb', line 52 def inspect "TwinoidUserId(#{@inner})" end |
#to_s ⇒ Object
42 43 44 |
# File 'lib/etwin/twinoid/twinoid_user_id.rb', line 42 def to_s @inner end |