Class: ChatRoomObject
- Inherits:
-
Object
- Object
- ChatRoomObject
- Includes:
- DataFactory, Foundry, StringFactory, Workflows
- Defined in:
- lib/sambal-cle/data_objects/chat_room.rb
Instance Attribute Summary collapse
-
#allow_change ⇒ Object
Returns the value of attribute allow_change.
-
#chat_display ⇒ Object
Returns the value of attribute chat_display.
-
#description ⇒ Object
Returns the value of attribute description.
-
#site ⇒ Object
Returns the value of attribute site.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
- #create ⇒ Object
- #delete ⇒ Object
- #edit(opts = {}) ⇒ Object
-
#initialize(browser, opts = {}) ⇒ ChatRoomObject
constructor
A new instance of ChatRoomObject.
- #view ⇒ Object
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 } = defaults.merge(opts) () requires @site end |
Instance Attribute Details
#allow_change ⇒ Object
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_display ⇒ Object
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 |
#description ⇒ Object
Returns the value of attribute description.
8 9 10 |
# File 'lib/sambal-cle/data_objects/chat_room.rb', line 8 def description @description end |
#site ⇒ Object
Returns the value of attribute site.
8 9 10 |
# File 'lib/sambal-cle/data_objects/chat_room.rb', line 8 def site @site end |
#title ⇒ Object
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
#create ⇒ Object
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. end on ManageRooms do |manage| manage.add_room end #TODO: finish this method end |
#delete ⇒ Object
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 |
#view ⇒ Object
41 42 43 |
# File 'lib/sambal-cle/data_objects/chat_room.rb', line 41 def view end |