Class: InsightsCloud::Async::RulesResult

Inherits:
Object
  • Object
show all
Defined in:
lib/insights_cloud/async/rules_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#countObject (readonly)

Returns the value of attribute count.



4
5
6
# File 'lib/insights_cloud/async/rules_result.rb', line 4

def count
  @count
end

#rulesObject (readonly)

Returns the value of attribute rules.



4
5
6
# File 'lib/insights_cloud/async/rules_result.rb', line 4

def rules
  @rules
end

#totalObject (readonly)

Returns the value of attribute total.



4
5
6
# File 'lib/insights_cloud/async/rules_result.rb', line 4

def total
  @total
end