Class: StatModule::Process
Constant Summary
Constants inherited
from JSONable
JSONable::FORMATTING_BALL, JSONable::FORMATTING_CHECKMARK, JSONable::FORMATTING_STAR, JSONable::FORMATTING_WARNING
Instance Method Summary
collapse
Methods inherited from JSONable
from_json!, #to_json
Constructor Details
#initialize(name, hash) ⇒ Process
Returns a new instance of Process.
7
8
9
10
11
12
13
14
15
|
# File 'lib/process.rb', line 7
def initialize(name, hash)
if hash.is_a? Hash
super(hash)
return
end
raise TypeException unless name.is_a?(String)
@name = name
end
|
Instance Method Details
#description ⇒ Object
40
41
42
|
# File 'lib/process.rb', line 40
def description
@description
end
|
#description=(description) ⇒ Object
35
36
37
38
|
# File 'lib/process.rb', line 35
def description=(description)
raise TypeException unless description.is_a?(String)
@description = description
end
|
#email ⇒ Object
58
59
60
|
# File 'lib/process.rb', line 58
def email
@email
end
|
#email=(email) ⇒ Object
53
54
55
56
|
# File 'lib/process.rb', line 53
def email=(email)
raise TypeException unless email.is_a?(String)
@email = email
end
|
#maintainer ⇒ Object
49
50
51
|
# File 'lib/process.rb', line 49
def maintainer
@maintainer
end
|
#maintainer=(maintainer) ⇒ Object
44
45
46
47
|
# File 'lib/process.rb', line 44
def maintainer=(maintainer)
raise TypeException unless maintainer.is_a?(String)
@maintainer = maintainer
end
|
#name ⇒ Object
22
23
24
|
# File 'lib/process.rb', line 22
def name
@name
end
|
#name=(name) ⇒ Object
17
18
19
20
|
# File 'lib/process.rb', line 17
def name=(name)
raise TypeException unless name.is_a?(String)
@name = name
end
|
#print(formatted = nil) ⇒ Object
80
81
82
83
84
85
86
87
88
89
|
# File 'lib/process.rb', line 80
def print(formatted = nil)
result = name
unless version.nil?
result += ", version #{version}"
end
if formatted
result = "#{FORMATTING_STAR.colorize(:yellow)} #{result}"
end
result
end
|
#repeatability ⇒ Object
76
77
78
|
# File 'lib/process.rb', line 76
def repeatability
@repeatability
end
|
#repeatability=(repeatability) ⇒ Object
71
72
73
74
|
# File 'lib/process.rb', line 71
def repeatability=(repeatability)
raise TypeException unless Repeatability.all.include?(repeatability)
@repeatability = repeatability
end
|
#version ⇒ Object
31
32
33
|
# File 'lib/process.rb', line 31
def version
@version
end
|
#version=(version) ⇒ Object
26
27
28
29
|
# File 'lib/process.rb', line 26
def version=(version)
raise TypeException unless version.is_a?(String)
@version = version
end
|
#website ⇒ Object
67
68
69
|
# File 'lib/process.rb', line 67
def website
@website
end
|
#website=(website) ⇒ Object
62
63
64
65
|
# File 'lib/process.rb', line 62
def website=(website)
raise TypeException unless website.is_a?(String)
@website = website
end
|