Class: LookOfDisapproval::Disapprover
- Inherits:
-
Object
- Object
- LookOfDisapproval::Disapprover
- Defined in:
- lib/look_of_disapproval.rb
Instance Method Summary collapse
-
#initialize(message = nil) ⇒ Disapprover
constructor
A new instance of Disapprover.
- #to_html ⇒ Object
- #write(filename) ⇒ Object
Constructor Details
#initialize(message = nil) ⇒ Disapprover
Returns a new instance of Disapprover.
5 6 7 8 |
# File 'lib/look_of_disapproval.rb', line 5 def initialize(=nil) @template = ERB.new(File.read(File.dirname(__FILE__)+'/look_of_disapproval/disapprove.erb')) @message = end |
Instance Method Details
#to_html ⇒ Object
10 11 12 |
# File 'lib/look_of_disapproval.rb', line 10 def to_html @template.result(binding) end |
#write(filename) ⇒ Object
14 15 16 |
# File 'lib/look_of_disapproval.rb', line 14 def write(filename) File.write(filename, to_html) end |