fix Style/EmptyLiteral issue
Change-Id: I8417d2abf3e2d3e01b691df553c79026801f6bce fixes: CNVS-20009 Reviewed-on: https://gerrit.instructure.com/52920 Tested-by: Jenkins Reviewed-by: Cody Cutrer <cody@instructure.com> Product-Review: Strand McCutchen <smccutchen@instructure.com> QA-Review: Strand McCutchen <smccutchen@instructure.com>
This commit is contained in:
parent
8672ae624c
commit
9d5157b15d
|
@ -141,7 +141,7 @@ module Context
|
|||
ids_by_type[type] += [id]
|
||||
end
|
||||
|
||||
result = Hash.new
|
||||
result = {}
|
||||
ids_by_type.each do |type, ids|
|
||||
klass = Object.const_get(type, false)
|
||||
klass.where(:id => ids).select([:id, :name]).map {|c| result[[type, c.id]] = c.name}
|
||||
|
|
|
@ -10,7 +10,7 @@ module Autoextend
|
|||
end
|
||||
|
||||
def self.extensions
|
||||
@extensions ||= Hash.new
|
||||
@extensions ||= {}
|
||||
end
|
||||
|
||||
MethodExtension = Struct.new(:target, :feature) do
|
||||
|
@ -87,11 +87,11 @@ module Autoextend
|
|||
end
|
||||
|
||||
def autoextensions
|
||||
@autoextensions ||= Hash.new
|
||||
@autoextensions ||= {}
|
||||
end
|
||||
|
||||
def singleton_autoextensions
|
||||
@autoextensions ||= Hash.new
|
||||
@autoextensions ||= {}
|
||||
end
|
||||
|
||||
def autoextend_singleton(method, feature)
|
||||
|
|
|
@ -31,7 +31,7 @@ module Workflow
|
|||
attr_accessor :states, :initial_state, :on_transition_proc
|
||||
|
||||
def initialize
|
||||
@states = Hash.new
|
||||
@states = {}
|
||||
end
|
||||
|
||||
def add(&specification)
|
||||
|
@ -85,7 +85,7 @@ module Workflow
|
|||
attr_accessor :name, :events, :on_entry, :on_exit
|
||||
|
||||
def initialize(name)
|
||||
@name, @events = name, Hash.new
|
||||
@name, @events = name, {}
|
||||
end
|
||||
|
||||
def to_s
|
||||
|
|
|
@ -20,7 +20,7 @@ module Api::V1
|
|||
|
||||
def json_for_date(date, course, api_context)
|
||||
submissions_set(course, api_context, :date => date).
|
||||
each_with_object(Hash.new) { |sub, memo| update_graders_hash(memo, sub, api_context) }.values.
|
||||
each_with_object({}) { |sub, memo| update_graders_hash(memo, sub, api_context) }.values.
|
||||
each { |grader| compress(grader, :assignments) }
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue