Class: Lipwig::Preview
- Inherits:
-
Object
- Object
- Lipwig::Preview
- Defined in:
- lib/lipwig/preview.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(email) ⇒ Preview
constructor
A new instance of Preview.
Constructor Details
#initialize(email) ⇒ Preview
Returns a new instance of Preview.
6 7 8 |
# File 'lib/lipwig/preview.rb', line 6 def initialize(email) @email = email end |
Class Method Details
.call(email) ⇒ Object
2 3 4 |
# File 'lib/lipwig/preview.rb', line 2 def self.call(email) new(email).call end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 |
# File 'lib/lipwig/preview.rb', line 10 def call File.write filename, email.body `open #{filename}` end |