Class: XcodeServer::Bot
- Inherits:
-
Object
- Object
- XcodeServer::Bot
- Defined in:
- lib/xcode_server/bot.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#tinyID ⇒ Object
readonly
Returns the value of attribute tinyID.
Instance Method Summary collapse
-
#initialize(server, json) ⇒ Bot
constructor
A new instance of Bot.
- #url ⇒ Object
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
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/xcode_server/bot.rb', line 3 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/xcode_server/bot.rb', line 3 def name @name end |
#tinyID ⇒ Object (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
#url ⇒ Object
12 13 14 |
# File 'lib/xcode_server/bot.rb', line 12 def url "#{@server.scheme}://#{@server.host}/xcode/bots/latest/#{tinyID}" end |