Class: User
- Inherits:
-
Data
- Object
- Data
- User
- Defined in:
- lib/inat-channel/data_types.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#login ⇒ Object
readonly
Returns the value of attribute login.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id
113 114 115 |
# File 'lib/inat-channel/data_types.rb', line 113 def id @id end |
#login ⇒ Object (readonly)
Returns the value of attribute login
113 114 115 |
# File 'lib/inat-channel/data_types.rb', line 113 def login @login end |
#name ⇒ Object (readonly)
Returns the value of attribute name
113 114 115 |
# File 'lib/inat-channel/data_types.rb', line 113 def name @name end |
Instance Method Details
#icon ⇒ Object
114 115 116 |
# File 'lib/inat-channel/data_types.rb', line 114 def icon IC::ICONS[:user] end |
#title ⇒ Object
117 118 119 120 121 122 123 |
# File 'lib/inat-channel/data_types.rb', line 117 def title if name && !name.empty? name else "@#{login}" end end |
#url ⇒ Object
124 125 126 |
# File 'lib/inat-channel/data_types.rb', line 124 def url "https://www.inaturalist.org/people/#{id}" end |