Class: Adjutant::Parser

Inherits:
Struct
  • Object
show all
Defined in:
lib/adjutant/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#jsonObject

Returns the value of attribute json

Returns:

  • (Object)

    the current value of json



2
3
4
# File 'lib/adjutant/parser.rb', line 2

def json
  @json
end

Instance Method Details

#commiter_nicknameObject



12
13
14
# File 'lib/adjutant/parser.rb', line 12

def commiter_nickname
  @nickname ||= json['pusher']['name']
end

#commits_shaObject



8
9
10
# File 'lib/adjutant/parser.rb', line 8

def commits_sha
  @shas ||= json['commits'].collect { |commit| commit['id'] }
end

#repo_nameObject



3
4
5
6
# File 'lib/adjutant/parser.rb', line 3

def repo_name
  @name ||=
    "#{json['repository']['owner']['name']}/#{json['repository']['name']}"
end