lib/visdiff/revision.rb in visdiff-0.0.2 vs lib/visdiff/revision.rb in visdiff-0.0.3

- old
+ new

@@ -1,13 +1,14 @@ module Visdiff class Revision - attr_reader :identifier, :images + attr_reader :identifier, :images, :description attr_accessor :client - def initialize identifier, images=[] + def initialize identifier, images=[], description=nil @identifier = identifier @images = images + @description = description end def add_image identifier, filename image = Image.new(identifier, filename) image.client = client @@ -31,10 +32,10 @@ def attributes { identifier: identifier, image_attributes: images.map do |image| - {identifier: image.identifier, signature: image.signature} + {identifier: image.identifier, description: description, signature: image.signature} end } end end end