TO MY EYES, the first is worse than the second.
Last active
June 29, 2019 23:00
-
-
Save veganstraightedge/159a4e536fcf3834cde5fb617ec8c1cd to your computer and use it in GitHub Desktop.
StandardRB and I think different things are better. ¯\_(ツ)_/¯
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Opinions | |
# StandardRB's opinion | |
def standardrb | |
if foo == bar || | |
foo == baz | |
puts "do stuff" | |
end | |
end | |
# My opinion | |
def mine | |
if foo == bar || | |
foo == baz | |
puts "do stuff" | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# StandardRB's opinion | |
config.cache_store = if ENV["MEMCACHEDCLOUD_SERVERS"] | |
[ | |
:dalli_store, | |
ENV["MEMCACHEDCLOUD_SERVERS"].split(","), | |
{ | |
username: ENV["MEMCACHEDCLOUD_USERNAME"], | |
password: ENV["MEMCACHEDCLOUD_PASSWORD"], | |
}, | |
] | |
else | |
# Cache in memory otherwise | |
[:memory_store, {size: 64.megabytes}] | |
end | |
# My opinion | |
config.cache_store = if ENV['MEMCACHEDCLOUD_SERVERS'] | |
[ | |
:dalli_store, | |
ENV['MEMCACHEDCLOUD_SERVERS'].split(','), | |
{ | |
username: ENV['MEMCACHEDCLOUD_USERNAME'], | |
password: ENV['MEMCACHEDCLOUD_PASSWORD'] | |
} | |
] | |
else | |
# Cache in memory otherwise | |
[:memory_store, { size: 64.megabytes }] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment