Class: Watirmark::Screenshot::MasterAlbum
- Defined in:
- lib/watirmark/screenshot.rb
Instance Attribute Summary collapse
-
#album ⇒ Object
Returns the value of attribute album.
Instance Method Summary collapse
-
#initialize(filename, screenshot) ⇒ MasterAlbum
constructor
A new instance of MasterAlbum.
Constructor Details
#initialize(filename, screenshot) ⇒ MasterAlbum
Returns a new instance of MasterAlbum.
59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/watirmark/screenshot.rb', line 59 def initialize(filename, screenshot) if Watirmark::Configuration.instance.snapshotwidth.kind_of?(Fixnum) @album = Master.new(filename, screenshot.screenshots) else widths = Watirmark::Configuration.instance.snapshotwidth.split(",").map {|s| s.to_i} @album = [] widths.each_with_index do |width, index| @album << Master.new(filename.sub(/\.png/, "_width_#{width}.png"), screenshot.screenshots[index]) end end end |
Instance Attribute Details
#album ⇒ Object
Returns the value of attribute album.
57 58 59 |
# File 'lib/watirmark/screenshot.rb', line 57 def album @album end |