Module: Nisetegami
- Defined in:
- lib/nisetegami.rb,
lib/nisetegami/utils.rb,
lib/nisetegami/engine.rb,
lib/nisetegami/mapping.rb,
lib/nisetegami/railtie.rb,
lib/nisetegami/version.rb,
lib/nisetegami/exceptions.rb,
lib/nisetegami/asset_provider.rb,
lib/nisetegami/template_presenter.rb,
lib/nisetegami/action_mailer_extensions.rb,
app/controllers/nisetegami/templates_controller.rb,
app/controllers/nisetegami/application_controller.rb
Defined Under Namespace
Modules: ActionMailerExtensions, Exceptions, Utils
Classes: ARTemplateResolver, ApplicationController, AssetProvider, Engine, Mapping, Railtie, Template, TemplatePresenter, TemplatesController, TestMailer
Constant Summary
collapse
- VERSION =
"0.5.4"
- @@mapping =
Nisetegami::Mapping.new
- @@email_re =
/[-a-z0-9_+\.]+@([-a-z0-9]+\.)+[a-z0-9]{2,}/
Class Method Summary
collapse
Class Method Details
.cast(&block) ⇒ Object
optional block to cast a thing (String, Symbol) into a class with liquid_methods
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/nisetegami.rb', line 33
def self.cast(&block)
@@cast ||= ->(thing) do
begin
thing = thing.to_s.constantize
block_given? ? yield(thing) : thing
rescue NameError
String
end
end
end
|
27
28
29
|
# File 'lib/nisetegami.rb', line 27
def self.configure
yield self
end
|
.populate! ⇒ Object
48
49
50
|
# File 'lib/nisetegami.rb', line 48
def self.populate!
@@mapping.populate!
end
|
.register(*args) ⇒ Object
44
45
46
|
# File 'lib/nisetegami.rb', line 44
def self.register(*args)
@@mapping.register(*args)
end
|