Class: Komonjo::Model::Channel

Inherits:
Object
  • Object
show all
Defined in:
lib/komonjo/models/channel.rb

Overview

slacke channel

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#createdObject

Returns the value of attribute created.



5
6
7
# File 'lib/komonjo/models/channel.rb', line 5

def created
  @created
end

#creatorObject

Returns the value of attribute creator.



5
6
7
# File 'lib/komonjo/models/channel.rb', line 5

def creator
  @creator
end

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/komonjo/models/channel.rb', line 5

def id
  @id
end

#is_archivedObject

Returns the value of attribute is_archived.



5
6
7
# File 'lib/komonjo/models/channel.rb', line 5

def is_archived
  @is_archived
end

#is_channelObject

Returns the value of attribute is_channel.



5
6
7
# File 'lib/komonjo/models/channel.rb', line 5

def is_channel
  @is_channel
end

#is_generalObject

Returns the value of attribute is_general.



5
6
7
# File 'lib/komonjo/models/channel.rb', line 5

def is_general
  @is_general
end

#is_memberObject

Returns the value of attribute is_member.



5
6
7
# File 'lib/komonjo/models/channel.rb', line 5

def is_member
  @is_member
end

#last_readObject

Returns the value of attribute last_read.



5
6
7
# File 'lib/komonjo/models/channel.rb', line 5

def last_read
  @last_read
end

#latestObject

Returns the value of attribute latest.



5
6
7
# File 'lib/komonjo/models/channel.rb', line 5

def latest
  @latest
end

#membersObject

Returns the value of attribute members.



5
6
7
# File 'lib/komonjo/models/channel.rb', line 5

def members
  @members
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/komonjo/models/channel.rb', line 5

def name
  @name
end

#purposeObject

Returns the value of attribute purpose.



5
6
7
# File 'lib/komonjo/models/channel.rb', line 5

def purpose
  @purpose
end

#topicObject

Returns the value of attribute topic.



5
6
7
# File 'lib/komonjo/models/channel.rb', line 5

def topic
  @topic
end

#unread_countObject

Returns the value of attribute unread_count.



5
6
7
# File 'lib/komonjo/models/channel.rb', line 5

def unread_count
  @unread_count
end

#unread_count_displayObject

Returns the value of attribute unread_count_display.



5
6
7
# File 'lib/komonjo/models/channel.rb', line 5

def unread_count_display
  @unread_count_display
end

Class Method Details

.create(hash) ⇒ Object



9
10
11
12
13
# File 'lib/komonjo/models/channel.rb', line 9

def self.create(hash)
  new.tap do |e|
    hash.each { |k, v| e.instance_variable_set("@#{k}", v) }
  end
end