Class: Wellness::Detail

Inherits:
Object
  • Object
show all
Defined in:
lib/wellness/detail.rb

Overview

The parent class of all details that need to run.

Author:

  • Matthew A. Johnston (warmwaffles)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, options = {}) ⇒ Detail

Returns a new instance of Detail.



8
9
10
11
12
# File 'lib/wellness/detail.rb', line 8

def initialize(name, options={})
  @name = name
  @options = options
  @result = {}
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/wellness/detail.rb', line 6

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/wellness/detail.rb', line 6

def options
  @options
end

#resultObject (readonly)

Returns the value of attribute result.



6
7
8
# File 'lib/wellness/detail.rb', line 6

def result
  @result
end

Instance Method Details

#callObject



14
15
16
17
# File 'lib/wellness/detail.rb', line 14

def call
  @result = self.check
  self
end

#checkHash

Returns:

  • (Hash)


20
21
22
# File 'lib/wellness/detail.rb', line 20

def check
  {}
end