Class: Lev::BlackHoleStatus

Inherits:
Object show all
Defined in:
lib/lev/black_hole_status.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.method_missing(method_sym, *args, &block) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/lev/black_hole_status.rb', line 16

def self.method_missing(method_sym, *args, &block)
  if Lev::Status.new.respond_to?(method_sym)
    raise NameError,
          "'#{method_sym}' is Lev::Status query method, and those cannot be called on BlackHoleStatus"
  else
    super
  end
end

Instance Method Details

#add_errorObject



10
# File 'lib/lev/black_hole_status.rb', line 10

def add_error(*); end

#saveObject



9
# File 'lib/lev/black_hole_status.rb', line 9

def save(*); end

#set_progressObject

Provide null object pattern methods for status setters; routines should not be checking their own status (they should know it), and outside callers should not be checking status unless the status object is a real one.



8
# File 'lib/lev/black_hole_status.rb', line 8

def set_progress(*); end