Skip to content

Instantly share code, notes, and snippets.

@jcasimir
Created October 19, 2015 21:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jcasimir/fd0ceaf731e79c9dd5da to your computer and use it in GitHub Desktop.
Save jcasimir/fd0ceaf731e79c9dd5da to your computer and use it in GitHub Desktop.
class FileReader
def read
filename = ARGV[0]
File.read(filename)
end
end
class NightWriter
attr_reader :file_reader
def initialize
@reader = FileReader.new
end
def encode_file_to_braille
# I wouldn't worry about testing this method
# unless you get everything else done
plain = reader.read
braille = encode_to_braille(plain)
end
def encode_to_braille(input)
# you've taken in an INPUT string
# do the magic
# send out an OUTPUT string
end
end
puts ARGV.inspect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment