Skip to content

Instantly share code, notes, and snippets.

View dladowitz's full-sized avatar

David Ladowitz dladowitz

View GitHub Profile
@dladowitz
dladowitz / list.rb
Created June 29, 2012 01:12
Todo code for Shereef's list_spec.rb
# uses spec files from: https://github.com/devbootcamp/todo/tree/tests
require './task.rb'
class List
def initialize(file_name)
@list = IO.readlines(file_name)
# puts @list[0].class
# puts @list.length
# @list = [1,2,3]
@dladowitz
dladowitz / InWords
Created June 28, 2012 06:17
Numbers to Words (up to 999) in ruby
module InWords
def in_words
ones = {
1 => "one",
2 => "two",
3 => "three",
4 => "four",
5 => "five",
@dladowitz
dladowitz / InWords.html
Created June 28, 2012 06:16
Numbers to words (up to 99) in Javascript
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
</head>
<body>
@dladowitz
dladowitz / todo_spec.rb
Created June 28, 2012 00:15
Rspec for Jesse's ToDo app
# require 'spec_helper'
require 'simplecov'
SimpleCov.start
require './list'
require './todo'
require './task'
describe Todo::List do
@dladowitz
dladowitz / todo.rb
Created June 24, 2012 07:46
ToDo App
require 'docopt'
#-------------------------------------------------------
class List
# attr_accessor :all_tasks
def initialize
@all_tasks = []
require 'docopt'
class Todo
def initialize
puts "Generating 'To Do' list"
@file = File.open("todo_list.txt", 'w+')
puts "'To Do' list generated"
end