Sha256: 75f7b5d9bfe36b9cba323a4d69fabb3371f713e22c4e72e6264f963c3be9b482

Contents?: true

Size: 216 Bytes

Versions: 4

Compression:

Stored size: 216 Bytes

Contents

module BookStoreCustomer
  include Dicer::Behavior

  def purchase(book)
    unless books.include?(book)
      books << book
      @purchased = true
    end
  end

  def purchased?
    @purchased ||= false
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dicer-0.3.0 examples/rails-3.2/app/behaviors/book_store_customer.rb
dicer-0.2.0 examples/rails-3.2/app/behaviors/book_store_customer.rb
dicer-0.1.0 examples/rails-3.2/app/behaviors/book_store_customer.rb
dicer-0.0.1 examples/rails-3.2/app/behaviors/book_store_customer.rb