Class: Etwin::Twinoid::TwinoidUserDisplayName

Inherits:
Object
  • Object
show all
Extended by:
T::Helpers, T::Sig
Defined in:
lib/etwin/twinoid/twinoid_user_display_name.rb

Overview

A valid Twinoid username

Instance Method Summary collapse

Constructor Details

#initialize(inner) ⇒ TwinoidUserDisplayName

Returns a new instance of TwinoidUserDisplayName.



21
22
23
24
# File 'lib/etwin/twinoid/twinoid_user_display_name.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_display_name.rb', line 27

def ==(other)
  case other
  when TwinoidUserDisplayName
    @inner == other.inner
  else
    false
  end
end

#as_jsonObject



47
48
49
# File 'lib/etwin/twinoid/twinoid_user_display_name.rb', line 47

def as_json
  @inner
end

#hashObject



37
38
39
# File 'lib/etwin/twinoid/twinoid_user_display_name.rb', line 37

def hash
  @inner.hash
end

#inspectObject



52
53
54
# File 'lib/etwin/twinoid/twinoid_user_display_name.rb', line 52

def inspect
  "TwinoidUserDisplayName(#{@inner})"
end

#to_sObject



42
43
44
# File 'lib/etwin/twinoid/twinoid_user_display_name.rb', line 42

def to_s
  @inner
end