Module: ActiveEvent::Command

Extended by:
ActiveSupport::Concern
Includes:
Support::AttrSetter, ActiveModel::Validations
Defined in:
lib/active_event/command.rb

Instance Method Summary collapse

Methods included from Support::AttrSetter

#init_attributes

Methods included from Support::AttrInitializer

#attributes_except, #freeze, #initialize, #to_hash

Instance Method Details

#is_valid_do(&block) ⇒ Object



22
23
24
25
26
27
28
29
30
# File 'lib/active_event/command.rb', line 22

def is_valid_do(&block)
  if valid?
    block.call
  else
    false
  end
rescue
  false
end