lib/travis/client/entity.rb in travis-1.1.3 vs lib/travis/client/entity.rb in travis-1.2.0

- old
+ new

@@ -67,13 +67,17 @@ def self.inspect_info(name) alias_method(:inspect_info, name) private(:inspect_info) end + def self.cast_id(id) + Integer(id) + end + def initialize(session, id) @attributes = {} @session = session - @id = Integer(id) + @id = self.class.cast_id(id) end def update_attributes(data) data.each_pair do |key, value| self[key] = value