Skip to content

Instantly share code, notes, and snippets.

@Dysp

Dysp/output.rb Secret

Last active June 26, 2016 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dysp/dac2936768feae83d657cca8f96daa14 to your computer and use it in GitHub Desktop.
Save Dysp/dac2936768feae83d657cca8f96daa14 to your computer and use it in GitHub Desktop.
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