Skip to content

Instantly share code, notes, and snippets.

View LFDM's full-sized avatar
🎯
Focusing

Gernot Höflechner LFDM

🎯
Focusing
View GitHub Profile
class A
def initialize
@a = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt"
@b = "ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris"
end
def to_s
@a[0] + @b[0]
end
end
@LFDM
LFDM / ternary_splitjoin.rb
Last active August 29, 2015 13:55
Demo of ternary splitjoin implementation
# Ternary splitjoin
condition ? 'this' : 'that'
# split
if condition
'this'
else
'that'