lib/runcible/models/distributor.rb in runcible-1.2.0 vs lib/runcible/models/distributor.rb in runcible-1.3.0

- old
+ new

@@ -27,25 +27,24 @@ module Runcible module Models class Distributor attr_accessor 'auto_publish', 'id' - def initialize(params={}) + def initialize(params = {}) @auto_publish = false - id = params[:id] || SecureRandom.hex(10) - params.each{|k,v| send("#{k.to_s}=",v)} + self.id = params[:id] || SecureRandom.hex(10) + params.each { |k, v| send("#{k}=", v) } end # Distributor Type id # # @return [string] def type_id self.class.type_id end def self.type_id - raise NotImplementedError("self.type_id") + fail NotImplementedError('self.type_id') end - end end end