Module: Snippr
- Extended by:
- Snippr
- Included in:
- Snippr
- Defined in:
- lib/snippr/i18n.rb,
lib/snippr/path.rb,
lib/snippr/snip.rb,
lib/snippr/clock.rb,
lib/snippr/links.rb,
lib/snippr/snippr.rb,
lib/snippr/tardis.rb,
lib/snippr/railtie.rb,
lib/snippr/meta_data.rb,
lib/snippr/processor.rb,
lib/snippr/normalizer.rb,
lib/snippr/view_helper.rb,
lib/snippr/segment_parser.rb,
lib/snippr/processor/block.rb,
lib/snippr/processor/links.rb,
lib/snippr/processor/dynamics.rb,
lib/snippr/processor/functions.rb,
lib/snippr/processor/wikilinks.rb,
lib/snippr/segment_filter/base.rb,
lib/snippr/normalizer/camelizer.rb,
lib/snippr/normalizer/de_rester.rb,
lib/snippr/segment_filter/on_host.rb,
lib/snippr/segment_filter/valid_from.rb,
lib/snippr/rails/controller_extension.rb,
lib/snippr/segment_filter/valid_until.rb,
lib/snippr/segment_filter/on_rails_env.rb,
lib/snippr/segment_filter/valid_between.rb
Overview
Snippr::Normalizer::DeRester
“Redirects” REST path elements that are accessed via POST (create, update destroy) with their corresponding GET elements (new, edit, show) so that when eg create is rendered due to an error in the action, it just looks exactly like the new page it was issued from.
Defined Under Namespace
Modules: I18n, Links, Normalizer, Path, Processor, Rails, SegmentFilter, ViewHelper Classes: Clock, MetaData, Railtie, SegmentParser, Snip, Tardis
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the logger.
Instance Method Summary collapse
-
#adjust_urls_except ⇒ Object
Returns the regular expressions used to determine which urls to exclude from adjustment.
-
#adjust_urls_except=(adjust_urls_except) ⇒ Object
Sets the regular expressions used to determine which urls to exclude from adjustment.
-
#i18n=(enabled) ⇒ Object
Sets whether to use I18n snippr files.
-
#i18n? ⇒ Boolean
Returns whether to use I18n snippr files.
-
#list(*args) ⇒ Object
Lists all snips inside a snippr directory specified by path parts.
-
#load(*args) ⇒ Object
Expects the name of a snippr file.
-
#path ⇒ Object
Returns the path to the snippr files (from JVM properties if available).
-
#path=(path) ⇒ Object
Sets the path to the snippr files.
- #tardis_enabled ⇒ Object
- #tardis_enabled=(bool_or_block) ⇒ Object
Instance Attribute Details
Instance Method Details
#adjust_urls_except ⇒ Object
Returns the regular expressions used to determine which urls to exclude from adjustment.
41 42 43 |
# File 'lib/snippr/snippr.rb', line 41 def adjust_urls_except Links.adjust_urls_except end |
#adjust_urls_except=(adjust_urls_except) ⇒ Object
Sets the regular expressions used to determine which urls to exclude from adjustment.
46 47 48 |
# File 'lib/snippr/snippr.rb', line 46 def adjust_urls_except=(adjust_urls_except) Links.adjust_urls_except = adjust_urls_except end |
#i18n=(enabled) ⇒ Object
Sets whether to use I18n snippr files.
36 37 38 |
# File 'lib/snippr/snippr.rb', line 36 def i18n=(enabled) I18n.enabled = enabled end |
#i18n? ⇒ Boolean
Returns whether to use I18n snippr files.
31 32 33 |
# File 'lib/snippr/snippr.rb', line 31 def i18n? I18n.enabled? end |
#list(*args) ⇒ Object
Lists all snips inside a snippr directory specified by path parts.
65 66 67 |
# File 'lib/snippr/snippr.rb', line 65 def list(*args) Path.list(*args) end |
#load(*args) ⇒ Object
Expects the name of a snippr file. Also accepts a Hash of placeholders to be replaced with dynamic values.
60 61 62 |
# File 'lib/snippr/snippr.rb', line 60 def load(*args) Snip.new(*args) end |
#path ⇒ Object
Returns the path to the snippr files (from JVM properties if available).
13 14 15 |
# File 'lib/snippr/snippr.rb', line 13 def path Path.path end |
#path=(path) ⇒ Object
Sets the path to the snippr files.
18 19 20 |
# File 'lib/snippr/snippr.rb', line 18 def path=(path) Path.path = path end |