Class: InsightsCloud::Async::RulesResult
- Inherits:
-
Object
- Object
- InsightsCloud::Async::RulesResult
- Defined in:
- lib/insights_cloud/async/rules_result.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#rules ⇒ Object
readonly
Returns the value of attribute rules.
-
#total ⇒ Object
readonly
Returns the value of attribute total.
Instance Method Summary collapse
-
#initialize(result) ⇒ RulesResult
constructor
A new instance of RulesResult.
Constructor Details
#initialize(result) ⇒ RulesResult
Returns a new instance of RulesResult.
6 7 8 9 10 |
# File 'lib/insights_cloud/async/rules_result.rb', line 6 def initialize(result) @total = result.dig('meta', 'count') @count = result['data'].length @rules = result['data'] end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
4 5 6 |
# File 'lib/insights_cloud/async/rules_result.rb', line 4 def count @count end |
#rules ⇒ Object (readonly)
Returns the value of attribute rules.
4 5 6 |
# File 'lib/insights_cloud/async/rules_result.rb', line 4 def rules @rules end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
4 5 6 |
# File 'lib/insights_cloud/async/rules_result.rb', line 4 def total @total end |