Class: Dash::Cli::Doctor::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/dash/cli/doctor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#check ⇒ Object

Returns the value of attribute check

Returns:

  • (Object) —

    the current value of check



26
27
28
# File 'lib/dash/cli/doctor.rb', line 26

def check
  @check
end

#detail ⇒ Object

Returns the value of attribute detail

Returns:

  • (Object) —

    the current value of detail



26
27
28
# File 'lib/dash/cli/doctor.rb', line 26

def detail
  @detail
end

#status ⇒ Object

Returns the value of attribute status

Returns:

  • (Object) —

    the current value of status



26
27
28
# File 'lib/dash/cli/doctor.rb', line 26

def status
  @status
end

#target ⇒ Object

Returns the value of attribute target

Returns:

  • (Object) —

    the current value of target



26
27
28
# File 'lib/dash/cli/doctor.rb', line 26

def target
  @target
end

Instance Method Details

#fail? ⇒ Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/dash/cli/doctor.rb', line 35

def fail?
  status == :fail
end

#ok? ⇒ Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/dash/cli/doctor.rb', line 27

def ok?
  status == :ok
end

#title ⇒ Object



39
40
41
# File 'lib/dash/cli/doctor.rb', line 39

def title
  CHECK_TITLES[check]
end

#to_s ⇒ Object



43
44
45
# File 'lib/dash/cli/doctor.rb', line 43

def to_s
  "#{status.to_s.upcase} #{target}: #{detail}"
end

#warn? ⇒ Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/dash/cli/doctor.rb', line 31

def warn?
  status == :warn
end