Class: DefaultPageProvider
- Inherits:
-
Object
- Object
- DefaultPageProvider
- Defined in:
- app/helpers/default_page_provider.rb
Overview
Motiro - A project tracking tool Copyright (C) 2006-2008 Thiago Arrais
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; either version 3 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Instance Method Summary collapse
- #find_by_name(name) ⇒ Object
-
#initialize(real_page_provider) ⇒ DefaultPageProvider
constructor
A new instance of DefaultPageProvider.
Constructor Details
#initialize(real_page_provider) ⇒ DefaultPageProvider
Returns a new instance of DefaultPageProvider.
19 20 21 |
# File 'app/helpers/default_page_provider.rb', line 19 def initialize(real_page_provider) @provider = real_page_provider end |
Instance Method Details
#find_by_name(name) ⇒ Object
23 24 25 |
# File 'app/helpers/default_page_provider.rb', line 23 def find_by_name(name) @provider.find_by_name(name) || Page.new(:name => name) end |