Class: SentrySummary::Issue

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, title, date, metadata, count) ⇒ Issue



123
124
125
126
127
128
129
# File 'lib/sentry-summary/sentry.rb', line 123

def initialize(id, title, date, , count)
  @id = id
  @title = title
  @date = DateTime.parse(date).to_time
   = 
  @count = count
end

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count.



121
122
123
# File 'lib/sentry-summary/sentry.rb', line 121

def count
  @count
end

#dateObject (readonly)

Returns the value of attribute date.



121
122
123
# File 'lib/sentry-summary/sentry.rb', line 121

def date
  @date
end

#idObject (readonly)

Returns the value of attribute id.



121
122
123
# File 'lib/sentry-summary/sentry.rb', line 121

def id
  @id
end

#metadataObject (readonly)

Returns the value of attribute metadata.



121
122
123
# File 'lib/sentry-summary/sentry.rb', line 121

def 
  
end

#titleObject (readonly)

Returns the value of attribute title.



121
122
123
# File 'lib/sentry-summary/sentry.rb', line 121

def title
  @title
end

Class Method Details

.build(dto) ⇒ Object



131
132
133
# File 'lib/sentry-summary/sentry.rb', line 131

def self.build(dto)
  Issue.new(dto[:id], dto[:title], dto[:lastSeen], dto[:metadata], dto[:count].to_i)
end