-
-
Save Dysp/dac2936768feae83d657cca8f96daa14 to your computer and use it in GitHub Desktop.
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
module Output | |
OUTPUT_DEFAULT = [] | |
KINCOM_DEFAULT = [] | |
def output_to(output_options = OUTPUT_DEFAULT) | |
case self | |
when Kincom | |
extract_data(:kincom) | |
p output_options | |
when String | |
puts "Class er string" | |
p output_options | |
else | |
puts "Jeg er forvirret" | |
end | |
end | |
def extract_data(type, kincom_options = KINCOM_DEFAULT) | |
case type | |
when :kincom | |
p kincom_options | |
when :legrig | |
puts "Not yet implemented" | |
else | |
puts "I don't know what is wrong" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment