Skip to content

Commit

Permalink
Remove literal true from conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
Derek Lindahl committed Apr 6, 2015
1 parent c106a0b commit 8ec0658
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/frenetic/resource_mockery.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ def build_structure
# based on any available type information provided in :default_attributes
def cast_types(params)
default_attributes.each do |key, value|
params[key] = case true
when value.is_a?(String) then String(params[key])
when value.is_a?(Float) then Float(params[key])
when value.is_a?(Integer) then Integer(params[key])
params[key] = case value
when String then String(params[key])
when Float then Float(params[key])
when Integer then Integer(params[key])
else params[key]
end
end
Expand Down

0 comments on commit 8ec0658

Please sign in to comment.