Class: ChatRoomObject

Inherits:
Object
  • Object
show all
Includes:
DataFactory, Foundry, StringFactory, Workflows
Defined in:
lib/sambal-cle/data_objects/chat_room.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Workflows

menu_link, #open_my_site_by_name, #reset

Constructor Details

#initialize(browser, opts = {}) ⇒ ChatRoomObject

Returns a new instance of ChatRoomObject.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/sambal-cle/data_objects/chat_room.rb', line 10

def initialize(browser, opts={})
  @browser = browser
  
  defaults = {
    :title=>random_alphanums,
    :description=>random_alphanums,
    :chat_display=>:show_all_messages,
    :allow_change=>:set
  }
  options = defaults.merge(opts)
  
  set_options(options)
  requires @site
end

Instance Attribute Details

#allow_changeObject

Returns the value of attribute allow_change.



8
9
10
# File 'lib/sambal-cle/data_objects/chat_room.rb', line 8

def allow_change
  @allow_change
end

#chat_displayObject

Returns the value of attribute chat_display.



8
9
10
# File 'lib/sambal-cle/data_objects/chat_room.rb', line 8

def chat_display
  @chat_display
end

#descriptionObject

Returns the value of attribute description.



8
9
10
# File 'lib/sambal-cle/data_objects/chat_room.rb', line 8

def description
  @description
end

#siteObject

Returns the value of attribute site.



8
9
10
# File 'lib/sambal-cle/data_objects/chat_room.rb', line 8

def site
  @site
end

#titleObject

Returns the value of attribute title.



8
9
10
# File 'lib/sambal-cle/data_objects/chat_room.rb', line 8

def title
  @title
end

Instance Method Details

#createObject



25
26
27
28
29
30
31
32
33
34
35
# File 'lib/sambal-cle/data_objects/chat_room.rb', line 25

def create
  open_my_site_by_name
  chat_room
  on ChatRoom do |chat|
    chat.options
  end
  on ManageRooms do |manage|
    manage.add_room
  end
  #TODO: finish this method
end

#deleteObject



45
46
47
# File 'lib/sambal-cle/data_objects/chat_room.rb', line 45

def delete
  
end

#edit(opts = {}) ⇒ Object



37
38
39
# File 'lib/sambal-cle/data_objects/chat_room.rb', line 37

def edit opts={}
  
end

#viewObject



41
42
43
# File 'lib/sambal-cle/data_objects/chat_room.rb', line 41

def view
  
end