Module: Muddle
- Defined in:
- lib/muddle.rb,
lib/muddle/version.rb
Defined Under Namespace
Modules: Filter, Logger Classes: Configuration, Parser
Constant Summary collapse
- VERSION =
"1.0.1"
Class Method Summary collapse
- .config ⇒ Object
-
.configure(&block) ⇒ Object
Top-level configuration function.
-
.parse(body_string) ⇒ Object
Top-level parser function.
- .parser ⇒ Object
- .version ⇒ Object
Class Method Details
.config ⇒ Object
20 21 22 |
# File 'lib/muddle.rb', line 20 def self.config @config ||= Muddle::Configuration.new end |
.configure(&block) ⇒ Object
Top-level configuration function
Pass it a block and the configuration object will yield ‘self’
16 17 18 |
# File 'lib/muddle.rb', line 16 def self.configure(&block) config.configure(&block) end |
.parse(body_string) ⇒ Object
Top-level parser function
body_string should be an email body in string form
returns body_string after passing it through the filters defined in Parser.filters
30 31 32 |
# File 'lib/muddle.rb', line 30 def self.parse(body_string) parser.parse body_string end |
.parser ⇒ Object
34 35 36 |
# File 'lib/muddle.rb', line 34 def self.parser @parser ||= Muddle::Parser.new end |
.version ⇒ Object
4 5 6 |
# File 'lib/muddle/version.rb', line 4 def self.version VERSION end |