Class: StaticMatic::Configuration
- Inherits:
-
Object
- Object
- StaticMatic::Configuration
- Defined in:
- lib/staticmatic/configuration.rb
Instance Attribute Summary collapse
-
#build_dir ⇒ Object
Returns the value of attribute build_dir.
-
#default_template_engine ⇒ Object
Returns the value of attribute default_template_engine.
-
#engine_options ⇒ Object
Returns the value of attribute engine_options.
-
#preview_engine_options ⇒ Object
Returns the value of attribute preview_engine_options.
-
#preview_server ⇒ Object
Returns the value of attribute preview_server.
-
#preview_server_host ⇒ Object
Returns the value of attribute preview_server_host.
-
#preview_server_port ⇒ Object
Returns the value of attribute preview_server_port.
-
#reverse_ext_mappings ⇒ Object
Returns the value of attribute reverse_ext_mappings.
-
#site_dir ⇒ Object
Returns the value of attribute site_dir.
-
#ssl_certificate_path ⇒ Object
Returns the value of attribute ssl_certificate_path.
-
#ssl_enable ⇒ Object
Returns the value of attribute ssl_enable.
-
#ssl_private_key_path ⇒ Object
Returns the value of attribute ssl_private_key_path.
-
#use_extensions_for_page_links ⇒ Object
Returns the value of attribute use_extensions_for_page_links.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/staticmatic/configuration.rb', line 19 def initialize self.preview_server = Rack::Handler::WEBrick self.preview_server_host = "localhost" self.preview_server_port = 4000 self.use_extensions_for_page_links = true self.default_template_engine = 'haml' self.site_dir = 'src' self.build_dir = 'build' self. = { 'haml' => {}, 'sass' => {}, 'scss' => {}, } self. = self..clone # TODO: discover a way of auto-detecting these. one can hope. self.reverse_ext_mappings = { 'sass' => 'css', 'scss' => 'css', 'less' => 'css', 'coffee' => 'js', 'builder' => 'xml', 'yajl' => 'json' } %w{ creole erb haml liquid radius mab markdown md mediawiki mkd mw nokogiri rdoc rhtml slim textile wiki }.each do |ext| @reverse_ext_mappings[ext] = 'html' end end |
Instance Attribute Details
#build_dir ⇒ Object
Returns the value of attribute build_dir.
11 12 13 |
# File 'lib/staticmatic/configuration.rb', line 11 def build_dir @build_dir end |
#default_template_engine ⇒ Object
Returns the value of attribute default_template_engine.
14 15 16 |
# File 'lib/staticmatic/configuration.rb', line 14 def default_template_engine @default_template_engine end |
#engine_options ⇒ Object
Returns the value of attribute engine_options.
16 17 18 |
# File 'lib/staticmatic/configuration.rb', line 16 def @engine_options end |
#preview_engine_options ⇒ Object
Returns the value of attribute preview_engine_options.
16 17 18 |
# File 'lib/staticmatic/configuration.rb', line 16 def @preview_engine_options end |
#preview_server ⇒ Object
Returns the value of attribute preview_server.
3 4 5 |
# File 'lib/staticmatic/configuration.rb', line 3 def preview_server @preview_server end |
#preview_server_host ⇒ Object
Returns the value of attribute preview_server_host.
4 5 6 |
# File 'lib/staticmatic/configuration.rb', line 4 def preview_server_host @preview_server_host end |
#preview_server_port ⇒ Object
Returns the value of attribute preview_server_port.
5 6 7 |
# File 'lib/staticmatic/configuration.rb', line 5 def preview_server_port @preview_server_port end |
#reverse_ext_mappings ⇒ Object
Returns the value of attribute reverse_ext_mappings.
17 18 19 |
# File 'lib/staticmatic/configuration.rb', line 17 def reverse_ext_mappings @reverse_ext_mappings end |
#site_dir ⇒ Object
Returns the value of attribute site_dir.
10 11 12 |
# File 'lib/staticmatic/configuration.rb', line 10 def site_dir @site_dir end |
#ssl_certificate_path ⇒ Object
Returns the value of attribute ssl_certificate_path.
8 9 10 |
# File 'lib/staticmatic/configuration.rb', line 8 def ssl_certificate_path @ssl_certificate_path end |
#ssl_enable ⇒ Object
Returns the value of attribute ssl_enable.
6 7 8 |
# File 'lib/staticmatic/configuration.rb', line 6 def ssl_enable @ssl_enable end |
#ssl_private_key_path ⇒ Object
Returns the value of attribute ssl_private_key_path.
7 8 9 |
# File 'lib/staticmatic/configuration.rb', line 7 def ssl_private_key_path @ssl_private_key_path end |
#use_extensions_for_page_links ⇒ Object
Returns the value of attribute use_extensions_for_page_links.
13 14 15 |
# File 'lib/staticmatic/configuration.rb', line 13 def use_extensions_for_page_links @use_extensions_for_page_links end |