Class: HockeyApp::CrashGroup
- Inherits:
-
Object
- Object
- HockeyApp::CrashGroup
- Extended by:
- ActiveModel::Naming
- Includes:
- ActiveModel::Conversion, ActiveModel::Validations, ActiveModelCompliance
- Defined in:
- lib/hockeyapp/models/crash_group.rb
Constant Summary collapse
- ATTRIBUTES =
[:file, :reason, :status, :id, :crash_class, :bundle_version, :last_crash_at, :app_version_id, :line, :updated_at, :method, :bundle_short_version, :number_of_crashes, :fixed, :created_at, :app_id]
Instance Attribute Summary collapse
-
#application ⇒ Object
readonly
Returns the value of attribute application.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(application, client) ⇒ CrashGroup
constructor
A new instance of CrashGroup.
Methods included from ActiveModelCompliance
Constructor Details
#initialize(application, client) ⇒ CrashGroup
Returns a new instance of CrashGroup.
25 26 27 28 |
# File 'lib/hockeyapp/models/crash_group.rb', line 25 def initialize application, client @application = application @client = client end |
Instance Attribute Details
#application ⇒ Object (readonly)
Returns the value of attribute application.
13 14 15 |
# File 'lib/hockeyapp/models/crash_group.rb', line 13 def application @application end |
Class Method Details
.from_hash(h, app, client) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/hockeyapp/models/crash_group.rb', line 16 def self.from_hash(h, app, client) res = self.new app, client ATTRIBUTES.each do |attribute| res.send("#{attribute.to_s}=", h[attribute.to_s]) unless (h[attribute.to_s].nil?) end res.send("crash_class=", h['class']) unless h['class'].nil? # we should not override the #class method res end |