Sha256: a545ce9727b35500a8d4dde5a2ad2ff2b7424d13cc6d0df4ce8a4e35fb16a0d7

Contents?: true

Size: 246 Bytes

Versions: 27

Compression:

Stored size: 246 Bytes

Contents

module Castronaut
  module Models
    
    module Consumeable
      
      def consumed?
        !consumed_at.nil?
      end
      
      def consume!
        self.consumed_at = Time.now
        self.save!
      end
      
    end
    
  end
end

Version data entries

27 entries across 27 versions & 6 rubygems

Version Path
3mix-castronaut-0.5.0.2 lib/castronaut/models/consumeable.rb
masover-castronaut-0.4.4.4 lib/castronaut/models/consumeable.rb
masover-castronaut-0.4.4.5 lib/castronaut/models/consumeable.rb
masover-castronaut-0.5.0.1 lib/castronaut/models/consumeable.rb
p8-castronaut-0.6.1.1 lib/castronaut/models/consumeable.rb
relevance-castronaut-0.2.0 lib/castronaut/models/consumeable.rb
relevance-castronaut-0.2.5 lib/castronaut/models/consumeable.rb
relevance-castronaut-0.3.0 lib/castronaut/models/consumeable.rb
relevance-castronaut-0.3.5 lib/castronaut/models/consumeable.rb
relevance-castronaut-0.3.6 lib/castronaut/models/consumeable.rb
relevance-castronaut-0.4.1 lib/castronaut/models/consumeable.rb
relevance-castronaut-0.4.2 lib/castronaut/models/consumeable.rb
relevance-castronaut-0.4.3 lib/castronaut/models/consumeable.rb
relevance-castronaut-0.4.4 lib/castronaut/models/consumeable.rb
relevance-castronaut-0.4.5 lib/castronaut/models/consumeable.rb
relevance-castronaut-0.4.6 lib/castronaut/models/consumeable.rb
relevance-castronaut-0.5.0 lib/castronaut/models/consumeable.rb
relevance-castronaut-0.5.1 lib/castronaut/models/consumeable.rb
relevance-castronaut-0.5.2 lib/castronaut/models/consumeable.rb
relevance-castronaut-0.5.3 lib/castronaut/models/consumeable.rb