class Emotion::Picker::Emotion

DAO class for representing an emotion

Attributes

description[R]
name[R]

Public Class Methods

new(name, description = '') click to toggle source

Emotion constructor @param name [String] @param description [String]

# File lib/emotion/picker/emotion.rb, line 12
def initialize(name, description = '')
  @name = name
  @description = description
end

Public Instance Methods

to_s() click to toggle source

Returns a string representation of the class @return [String]

# File lib/emotion/picker/emotion.rb, line 19
def to_s
  str = @name
  str << " - #{@description}" unless @description == ''
  str
end