Module: Mintaka::Configuration
- Included in:
- Mintaka
- Defined in:
- lib/mintaka/configuration.rb
Instance Attribute Summary collapse
-
#content_path ⇒ Object
Returns the value of attribute content_path.
-
#home_page ⇒ Object
Returns the value of attribute home_page.
-
#layout ⇒ Object
Returns the value of attribute layout.
-
#parent_engine ⇒ Object
Returns the value of attribute parent_engine.
-
#route_drawer ⇒ Object
Returns the value of attribute route_drawer.
Class Method Summary collapse
Instance Method Summary collapse
- #configure {|_self| ... } ⇒ Object
- #full_path ⇒ Object
- #page_ids ⇒ Object
- #set_default_configuration ⇒ Object
Instance Attribute Details
#content_path ⇒ Object
Returns the value of attribute content_path.
3 4 5 |
# File 'lib/mintaka/configuration.rb', line 3 def content_path @content_path end |
#home_page ⇒ Object
Returns the value of attribute home_page.
3 4 5 |
# File 'lib/mintaka/configuration.rb', line 3 def home_page @home_page end |
#layout ⇒ Object
Returns the value of attribute layout.
3 4 5 |
# File 'lib/mintaka/configuration.rb', line 3 def layout @layout end |
#parent_engine ⇒ Object
Returns the value of attribute parent_engine.
3 4 5 |
# File 'lib/mintaka/configuration.rb', line 3 def parent_engine @parent_engine end |
#route_drawer ⇒ Object
Returns the value of attribute route_drawer.
3 4 5 |
# File 'lib/mintaka/configuration.rb', line 3 def route_drawer @route_drawer end |
Class Method Details
.extended(base) ⇒ Object
16 17 18 |
# File 'lib/mintaka/configuration.rb', line 16 def self.extended(base) base.set_default_configuration end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
12 13 14 |
# File 'lib/mintaka/configuration.rb', line 12 def configure yield self end |
#full_path ⇒ Object
24 25 26 |
# File 'lib/mintaka/configuration.rb', line 24 def full_path Rails.root.join("app", "views", Mintaka.content_path) end |
#page_ids ⇒ Object
20 21 22 |
# File 'lib/mintaka/configuration.rb', line 20 def page_ids Mintaka::PageCollector.new(Mintaka.full_path).page_ids end |
#set_default_configuration ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/mintaka/configuration.rb', line 28 def set_default_configuration self.content_path = 'pages/' self.home_page = nil self.layout = 'application' self.route_drawer = Mintaka::RouteDrawers::Default self.routes = true end |