Class: XcodeServer::Bot

Inherits:
Object
  • Object
show all
Defined in:
lib/xcode_server/bot.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(server, json) ⇒ Bot

Returns a new instance of Bot.



5
6
7
8
9
10
# File 'lib/xcode_server/bot.rb', line 5

def initialize(server, json)
  @server = server
  @id = json['_id']
  @tinyID = json['tinyID']
  @name = json['name']
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/xcode_server/bot.rb', line 3

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/xcode_server/bot.rb', line 3

def name
  @name
end

#tinyIDObject (readonly)

Returns the value of attribute tinyID.



3
4
5
# File 'lib/xcode_server/bot.rb', line 3

def tinyID
  @tinyID
end

Instance Method Details

#urlObject



12
13
14
# File 'lib/xcode_server/bot.rb', line 12

def url
  "#{@server.scheme}://#{@server.host}/xcode/bots/latest/#{tinyID}"
end