Class: Socrates::Adapters::User

Inherits:
Struct
  • Object
show all
Defined in:
lib/socrates/adapters/stubs.rb

Overview

User, Profile are POROs that represent keys concepts that exist in Slack (or other chat systems).

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



6
7
8
# File 'lib/socrates/adapters/stubs.rb', line 6

def id
  @id
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



6
7
8
# File 'lib/socrates/adapters/stubs.rb', line 6

def name
  @name
end

#profileObject

Returns the value of attribute profile

Returns:

  • (Object)

    the current value of profile



6
7
8
# File 'lib/socrates/adapters/stubs.rb', line 6

def profile
  @profile
end

#tz_offsetObject

Returns the value of attribute tz_offset

Returns:

  • (Object)

    the current value of tz_offset



6
7
8
# File 'lib/socrates/adapters/stubs.rb', line 6

def tz_offset
  @tz_offset
end

Instance Method Details

#real_nameObject



7
8
9
10
11
# File 'lib/socrates/adapters/stubs.rb', line 7

def real_name
  return "" if profile.nil?

  "#{profile.first_name} #{profile.last_name}"
end