Class: HookSniff::Models::Stats

Inherits:
Object
  • Object
show all
Defined in:
lib/hooksniff/models.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Stats

Returns a new instance of Stats.



126
127
128
129
130
131
132
133
# File 'lib/hooksniff/models.rb', line 126

def initialize(data)
  @total_deliveries = data["total_deliveries"]
  @delivered = data["delivered"]
  @failed = data["failed"]
  @pending = data["pending"]
  @success_rate = data["success_rate"]
  @endpoints_count = data["endpoints_count"]
end

Instance Attribute Details

#deliveredObject (readonly)

Returns the value of attribute delivered.



124
125
126
# File 'lib/hooksniff/models.rb', line 124

def delivered
  @delivered
end

#endpoints_countObject (readonly)

Returns the value of attribute endpoints_count.



124
125
126
# File 'lib/hooksniff/models.rb', line 124

def endpoints_count
  @endpoints_count
end

#failedObject (readonly)

Returns the value of attribute failed.



124
125
126
# File 'lib/hooksniff/models.rb', line 124

def failed
  @failed
end

#pendingObject (readonly)

Returns the value of attribute pending.



124
125
126
# File 'lib/hooksniff/models.rb', line 124

def pending
  @pending
end

#success_rateObject (readonly)

Returns the value of attribute success_rate.



124
125
126
# File 'lib/hooksniff/models.rb', line 124

def success_rate
  @success_rate
end

#total_deliveriesObject (readonly)

Returns the value of attribute total_deliveries.



124
125
126
# File 'lib/hooksniff/models.rb', line 124

def total_deliveries
  @total_deliveries
end