Class: SolidObjects::Doctor::Check

Inherits:
Object
  • Object
show all
Defined in:
lib/solid_objects/doctor.rb,
sig/generated/lib/solid_objects/doctor.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, status:, message:) ⇒ Check

Returns a new instance of Check.

RBS:

  • (name: Symbol, status: Symbol, message: String) -> void

Parameters:

  • name: (Symbol)
  • status: (Symbol)
  • message: (String)


16
17
18
19
20
21
# File 'lib/solid_objects/doctor.rb', line 16

def initialize(name:, status:, message:)
  @name = name
  @status = status
  @message = message
  freeze
end

Instance Attribute Details

#messageObject (readonly)

RBS:

  • @name: Symbol

  • @status: Symbol

  • @message: String

Returns:

  • (Object)


13
14
15
# File 'lib/solid_objects/doctor.rb', line 13

def message
  @message
end

#nameObject (readonly)

RBS:

  • @name: Symbol

  • @status: Symbol

  • @message: String

Returns:

  • (Object)


13
14
15
# File 'lib/solid_objects/doctor.rb', line 13

def name
  @name
end

#statusObject (readonly)

RBS:

  • @name: Symbol

  • @status: Symbol

  • @message: String

Returns:

  • (Object)


13
14
15
# File 'lib/solid_objects/doctor.rb', line 13

def status
  @status
end

Instance Method Details

#failed?Boolean

RBS:

  • () -> bool

Returns:

  • (Boolean)


24
25
26
# File 'lib/solid_objects/doctor.rb', line 24

def failed?
  status == :fail
end