Class: Shoes::Types::App
- Inherits:
-
Object
- Object
- Shoes::Types::App
- Defined in:
- lib/shoes/download.rb,
lib/shoes/inspect.rb,
lib/shoes/image.rb
Overview
Monkey patch over the āCā code.
Instance Method Summary collapse
-
#download(url, options = {}, &blk) ⇒ Object
Shoes::Types::App seems wrong but it works.
- #inspect(hits = nil) ⇒ Object
- #snapshot(options = {}, &block) ⇒ Object
Instance Method Details
#download(url, options = {}, &blk) ⇒ Object
Shoes::Types::App seems wrong but it works.
118 119 120 121 |
# File 'lib/shoes/download.rb', line 118 def download (url, = {}, &blk) #puts "download #{url} #{options} " Shoes::Download.new(url, , &blk) end |
#inspect(hits = nil) ⇒ Object
125 126 127 |
# File 'lib/shoes/inspect.rb', line 125 def inspect(hits = nil) "(#{self.class} #{name.dump})" end |
#snapshot(options = {}, &block) ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/shoes/image.rb', line 55 def snapshot( = {}, &block) [:format] ||= :svg [:filename] ||= ( tf_path = ( require 'tempfile' tf = Tempfile.new(File.basename(__FILE__)).path )) _snapshot do block.call end return File.read([:filename]) ensure File.unlink(tf_path) if tf_path end |