Created
May 14, 2015 15:13
-
-
Save ecuageo/0750fba992fb2c94ad3f to your computer and use it in GitHub Desktop.
use builtin conversion protocols 1
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 GreekAlphabetArray | |
def initialize | |
@alpha = 'ἄ' | |
@beta = 'β' | |
@gamma = 'γ' | |
@delta = 'δ' | |
end | |
def to_a | |
[@alpha, @beta, @gamma, @delta] | |
end | |
end | |
fa = GreekAlphabetArray.new | |
first = fa.to_a[0] | |
second = fa.to_a[1] | |
puts "This is the first letter in the Greek Alphabet #{first}" | |
puts "And this the second #{second}" | |
_, _, third = fa.to_a | |
puts "And this the third #{third}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment