Sha256: e24826d7a3a98199e5d52fde7aa30ab9593567e15cddc84773711668a8ae0150

Contents?: true

Size: 323 Bytes

Versions: 13

Compression:

Stored size: 323 Bytes

Contents

class Capture
  include DataMapper::Resource
  
  property :id,       Serial
  property :name,     String
  property :contents, Text
  
  belongs_to :server, :required => false
  
  after :create do
    self.clear!
  end
  
  def clear!
    self.contents = ''
  end
  
  def append(data)
    self.contents << data
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fabric-0.4.4 lib/fabric/capture.rb
fabric-0.4.3 lib/fabric/capture.rb
fabric-0.4.2 lib/fabric/capture.rb
fabric-0.4.1 lib/fabric/capture.rb
fabric-0.4.0 lib/fabric/capture.rb
fabric-0.3.6 lib/fabric/capture.rb
fabric-0.3.5 lib/fabric/capture.rb
fabric-0.3.4 lib/fabric/capture.rb
fabric-0.3.3 lib/fabric/capture.rb
fabric-0.3.2 lib/fabric/capture.rb
fabric-0.3.1 lib/fabric/capture.rb
fabric-0.3.0 lib/fabric/capture.rb
fabric-0.2.0 lib/fabric/capture.rb