explicitly assign all defaults in Web constructor
This commit is contained in:
parent
75a8a3f560
commit
6c020342a3
1 changed files with 11 additions and 5 deletions
|
@ -9,13 +9,19 @@ class Web
|
|||
attr_accessor :additional_style, :published, :brackets_only, :count_pages, :allow_uploads
|
||||
|
||||
def initialize(parent_wiki, name, address, password = nil)
|
||||
@name, @address, @password, @safe_mode = name, address, password, false
|
||||
@pages = {}
|
||||
@wiki = parent_wiki
|
||||
@wiki, @name, @address, @password = parent_wiki, name, address, password
|
||||
|
||||
# assign default values
|
||||
@color = '008B26'
|
||||
# default values
|
||||
@markup = :textile
|
||||
@color = '008B26'
|
||||
@safe_mode = false
|
||||
@pages = {}
|
||||
@allow_uploads = true
|
||||
@additional_style = nil
|
||||
@published = false
|
||||
@brackets_only = false
|
||||
@count_pages = false
|
||||
@allow_uploads = true
|
||||
end
|
||||
|
||||
def add_page(page)
|
||||
|
|
Loading…
Reference in a new issue