Class: Rafflesia::CacheBenchmarkSuiteCaseData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::CacheBenchmarkSuiteCaseData
- Defined in:
- lib/rafflesia/cache/cache_benchmark_suite_case_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ benchmark: :benchmark, name: :name, passed: :passed, reasons: :reasons, workload: :workload }.freeze
Instance Attribute Summary collapse
-
#benchmark ⇒ Object
Returns the value of attribute benchmark.
-
#name ⇒ Object
Returns the value of attribute name.
-
#passed ⇒ Object
Returns the value of attribute passed.
-
#reasons ⇒ Object
Returns the value of attribute reasons.
-
#workload ⇒ Object
Returns the value of attribute workload.
Instance Method Summary collapse
-
#initialize(json) ⇒ CacheBenchmarkSuiteCaseData
constructor
A new instance of CacheBenchmarkSuiteCaseData.
Constructor Details
#initialize(json) ⇒ CacheBenchmarkSuiteCaseData
Returns a new instance of CacheBenchmarkSuiteCaseData.
23 24 25 26 27 28 29 30 31 |
# File 'lib/rafflesia/cache/cache_benchmark_suite_case_data.rb', line 23 def initialize(json) super() hash = self.class.normalize(json) @benchmark = hash[:benchmark] ? Rafflesia::CacheBenchmarkData.new(hash[:benchmark]) : nil @name = hash[:name] @passed = hash[:passed] @reasons = (hash[:reasons] || []) @workload = hash[:workload] end |
Instance Attribute Details
#benchmark ⇒ Object
Returns the value of attribute benchmark.
16 17 18 |
# File 'lib/rafflesia/cache/cache_benchmark_suite_case_data.rb', line 16 def benchmark @benchmark end |
#name ⇒ Object
Returns the value of attribute name.
16 17 18 |
# File 'lib/rafflesia/cache/cache_benchmark_suite_case_data.rb', line 16 def name @name end |
#passed ⇒ Object
Returns the value of attribute passed.
16 17 18 |
# File 'lib/rafflesia/cache/cache_benchmark_suite_case_data.rb', line 16 def passed @passed end |
#reasons ⇒ Object
Returns the value of attribute reasons.
16 17 18 |
# File 'lib/rafflesia/cache/cache_benchmark_suite_case_data.rb', line 16 def reasons @reasons end |
#workload ⇒ Object
Returns the value of attribute workload.
16 17 18 |
# File 'lib/rafflesia/cache/cache_benchmark_suite_case_data.rb', line 16 def workload @workload end |