Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
StandardRB and I think different things are better. ¯\_(ツ)_/¯

TO MY EYES, the first is worse than the second.

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
# 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
You can’t perform that action at this time.