module SimpleCommand
Constants
- VERSION
Attributes
result[R]
Public Class Methods
prepended(base)
click to toggle source
# File lib/yyks_simple_command.rb, line 13 def self.prepended(base) base.extend ClassMethods end
Public Instance Methods
call()
click to toggle source
Calls superclass method
# File lib/yyks_simple_command.rb, line 17 def call fail NotImplementedError unless defined?(super) @called = true @result = super self end
errors()
click to toggle source
# File lib/yyks_simple_command.rb, line 34 def errors @errors ||= Errors.new end
failure?()
click to toggle source
# File lib/yyks_simple_command.rb, line 30 def failure? called? && errors.any? end
success?()
click to toggle source
# File lib/yyks_simple_command.rb, line 26 def success? called? && !failure? end
Private Instance Methods
called?()
click to toggle source
# File lib/yyks_simple_command.rb, line 40 def called? @called ||= false end