Class: SentrySummary::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/sentry-summary/sentry.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, issue_id, date, route, metadata) ⇒ Event

Returns a new instance of Event.



139
140
141
142
143
144
145
# File 'lib/sentry-summary/sentry.rb', line 139

def initialize(id, issue_id, date, route, )
  @id = id
  @issue_id = issue_id
  @date = DateTime.parse(date).to_time
  @route = route
  @metadata = 
end

Instance Attribute Details

#dateObject (readonly)

Returns the value of attribute date.



137
138
139
# File 'lib/sentry-summary/sentry.rb', line 137

def date
  @date
end

#idObject (readonly)

Returns the value of attribute id.



137
138
139
# File 'lib/sentry-summary/sentry.rb', line 137

def id
  @id
end

#issue_idObject (readonly)

Returns the value of attribute issue_id.



137
138
139
# File 'lib/sentry-summary/sentry.rb', line 137

def issue_id
  @issue_id
end

#metadataObject (readonly)

Returns the value of attribute metadata.



137
138
139
# File 'lib/sentry-summary/sentry.rb', line 137

def 
  @metadata
end

#routeObject (readonly)

Returns the value of attribute route.



137
138
139
# File 'lib/sentry-summary/sentry.rb', line 137

def route
  @route
end

Class Method Details

.build(dto) ⇒ Object



147
148
149
# File 'lib/sentry-summary/sentry.rb', line 147

def self.build(dto)
  Event.new(dto[:id], dto[:issue_id], dto[:dateCreated], dto[:context][:Route], dto[:metadata])
end