Class: GHArchive::BasicComment

Inherits:
Entity
  • Object
show all
Defined in:
lib/gh-archive/entities.rb

Direct Known Subclasses

IssueComment, PullRequestComment

Instance Method Summary collapse

Methods inherited from Entity

#initialize

Constructor Details

This class inherits a constructor from GHArchive::Entity

Instance Method Details

#bodyObject



200
201
202
# File 'lib/gh-archive/entities.rb', line 200

def body
    @payload['body']
end

#created_atObject



192
193
194
# File 'lib/gh-archive/entities.rb', line 192

def created_at
    Time.parse(@payload['created_at'])
end

#idObject



184
185
186
# File 'lib/gh-archive/entities.rb', line 184

def id
    @payload['id']
end

#updated_atObject



196
197
198
# File 'lib/gh-archive/entities.rb', line 196

def updated_at
    Time.parse(@payload['updated_at']) rescue nil
end

#urlObject



180
181
182
# File 'lib/gh-archive/entities.rb', line 180

def url
    @payload['url']
end

#userObject



188
189
190
# File 'lib/gh-archive/entities.rb', line 188

def user
    User.new(@payload['user']) rescue nil
end