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



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

def body
    @payload['body']
end

#created_atObject



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

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

#idObject



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

def id
    @payload['id']
end

#updated_atObject



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

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

#urlObject



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

def url
    @payload['url']
end

#userObject



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

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