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