Module: HighVoltage::Configuration

Included in:
HighVoltage
Defined in:
lib/high_voltage/configuration.rb

Constant Summary collapse

CACHING_DEPRECATION_WARNING =
<<-WARNING.strip_heredoc.squish
Caching support has been deprecated and will be removed
in the next release.
WARNING

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#action_cachingObject

Returns the value of attribute action_caching.



17
18
19
# File 'lib/high_voltage/configuration.rb', line 17

def action_caching
  @action_caching
end

#action_caching_layoutObject

Returns the value of attribute action_caching_layout.



17
18
19
# File 'lib/high_voltage/configuration.rb', line 17

def action_caching_layout
  @action_caching_layout
end

#content_pathObject

Returns the value of attribute content_path.



8
9
10
# File 'lib/high_voltage/configuration.rb', line 8

def content_path
  @content_path
end

#home_pageObject

Returns the value of attribute home_page.



8
9
10
# File 'lib/high_voltage/configuration.rb', line 8

def home_page
  @home_page
end

#layoutObject

Returns the value of attribute layout.



8
9
10
# File 'lib/high_voltage/configuration.rb', line 8

def layout
  @layout
end

#page_cachingObject

Returns the value of attribute page_caching.



17
18
19
# File 'lib/high_voltage/configuration.rb', line 17

def page_caching
  @page_caching
end

#parent_engineObject

Returns the value of attribute parent_engine.



8
9
10
# File 'lib/high_voltage/configuration.rb', line 8

def parent_engine
  @parent_engine
end

#route_drawerObject

Returns the value of attribute route_drawer.



8
9
10
# File 'lib/high_voltage/configuration.rb', line 8

def route_drawer
  @route_drawer
end

Class Method Details

.extended(base) ⇒ Object



23
24
25
# File 'lib/high_voltage/configuration.rb', line 23

def self.extended(base)
  base.set_default_configuration
end

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



19
20
21
# File 'lib/high_voltage/configuration.rb', line 19

def configure
  yield self
end

#set_default_configurationObject



42
43
44
45
46
47
48
49
50
51
52
# File 'lib/high_voltage/configuration.rb', line 42

def set_default_configuration
  @action_caching = false
  @action_caching_layout = true
  @page_caching = false

  self.content_path = 'pages/'
  self.home_page = nil
  self.layout = 'application'
  self.route_drawer = HighVoltage::RouteDrawers::Default
  self.routes = true
end