Sha256: 706adfc0820fbad059b665a6908cd4edc5f243d213a65394ab29ae3fd2925519

Contents?: true

Size: 307 Bytes

Versions: 35

Compression:

Stored size: 307 Bytes

Contents

class Return
  attr_accessor :order, :items

  def initialize(order, items)
    self.order = order
    self.items = items
  end

  def submit
    @success = items.map(&:return!).reduce(&:&)
  rescue Transitions::InvalidTransition
    @success = false
  end

  def successful?
    @success || false
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
artfully_ose-1.2.0.pre.11 app/models/return.rb
artfully_ose-1.2.0.pre.10 app/models/return.rb
artfully_ose-1.2.0.pre.9 app/models/return.rb
artfully_ose-1.2.0.pre.8 app/models/return.rb
artfully_ose-1.2.0.pre.7 app/models/return.rb
artfully_ose-1.2.0.pre.6 app/models/return.rb
artfully_ose-1.2.0.pre.5 app/models/return.rb
artfully_ose-1.2.0.pre.4 app/models/return.rb
artfully_ose-1.2.0.pre.3 app/models/return.rb
artfully_ose-1.2.0.pre.2 app/models/return.rb
artfully_ose-1.2.0.pre.1 app/models/return.rb
artfully_ose-1.2.0.pre app/models/return.rb
artfully_ose-1.1.0 app/models/return.rb
artfully_ose-1.1.0.rc2 app/models/return.rb
artfully_ose-1.1.0.rc1 app/models/return.rb