lib/artoo/robot.rb in artoo-1.5.0 vs lib/artoo/robot.rb in artoo-1.6.0
- old
+ new
@@ -38,10 +38,10 @@
# @param [Hash] params
# @option params [String] :name
# @option params [Collection] :connections
# @option params [Collection] :devices
def initialize(params={})
- @name = params[:name] || "Robot #{random_string}"
+ @name = params[:name] || current_class.name || "Robot #{random_string}"
@commands = params[:commands] || []
initialize_connections(params[:connections] || {})
initialize_devices(params[:devices] || {})
end