Sha256: 278fba4603986a3a09f55c8ef0c04dc7835404b07a3e309debddabe27c0f70c9

Contents?: true

Size: 333 Bytes

Versions: 16

Compression:

Stored size: 333 Bytes

Contents

class GuardArgumentsCheck
  include AASM

  aasm do
    state :new, :reviewed, :finalized

    event :mark_as_reviewed,
          :guard => proc { |*args| arguments_list(*args) } do
      transitions :from => :new, :to => :reviewed
    end
  end

  def arguments_list(arg1, arg2)
    return false unless arg1.nil?
    true
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
aasm-5.3.1 spec/models/guard_arguments_check.rb
aasm-5.3.0 spec/models/guard_arguments_check.rb
aasm-5.2.0 spec/models/guard_arguments_check.rb
aasm-5.1.1 spec/models/guard_arguments_check.rb
aasm-5.1.0 spec/models/guard_arguments_check.rb
aasm-5.0.8 spec/models/guard_arguments_check.rb
aasm-5.0.7 spec/models/guard_arguments_check.rb
aasm-5.0.6 spec/models/guard_arguments_check.rb
aasm-5.0.5 spec/models/guard_arguments_check.rb
aasm-5.0.4 spec/models/guard_arguments_check.rb
aasm-5.0.3 spec/models/guard_arguments_check.rb
aasm-5.0.2 spec/models/guard_arguments_check.rb
aasm-5.0.1 spec/models/guard_arguments_check.rb
aasm-5.0.0 spec/models/guard_arguments_check.rb
aasm-4.12.3 spec/models/guard_arguments_check.rb
aasm-4.12.2 spec/models/guard_arguments_check.rb