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
require 'docopt' | |
class Todo | |
def initialize | |
puts "Generating 'To Do' list" | |
@file = File.open("todo_list.txt", 'w+') | |
puts "'To Do' list generated" | |
end |
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
require 'docopt' | |
#------------------------------------------------------- | |
class List | |
# attr_accessor :all_tasks | |
def initialize | |
@all_tasks = [] |
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
# require 'spec_helper' | |
require 'simplecov' | |
SimpleCov.start | |
require './list' | |
require './todo' | |
require './task' | |
describe Todo::List do |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html lang="en"> | |
<head> | |
</head> | |
<body> |
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 InWords | |
def in_words | |
ones = { | |
1 => "one", | |
2 => "two", | |
3 => "three", | |
4 => "four", | |
5 => "five", |
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
# 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] |
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
# Uses spec files from: https://github.com/devbootcamp/todo/tree/tests | |
class Task | |
def initialize(task_name, date_created = Time.now, date_completed = nil) | |
@task = task_name | |
@date_created = date_created | |
@date_completed = date_completed | |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<!-- SQL XML created by WWW SQL Designer, http://code.google.com/p/wwwsqldesigner/ --> | |
<!-- Active URL: http://socrates.devbootcamp.com/sql.html --> | |
<sql> | |
<datatypes db="mysql"> | |
<group label="Numeric" color="rgb(238,238,170)"> | |
<type label="Integer" length="0" sql="INTEGER" re="INT" quote=""/> | |
<type label="Decimal" length="1" sql="DECIMAL" re="DEC" quote=""/> | |
<type label="Single precision" length="0" sql="FLOAT" quote=""/> | |
<type label="Double precision" length="0" sql="DOUBLE" re="DOUBLE" quote=""/> |
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
// David Ladowitz | |
// start time: 8:00pm | |
// Exercise 1.................................................... | |
var newConcat = function(first, last){ | |
return (first + last) | |
}; | |
newConcat('david', 'ladowitz') |
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
require 'active_record' | |
require 'sqlite3' | |
ActiveRecord::Base.establish_connection :adapter => 'sqlite3', | |
:database => 'db/students.db' | |
ActiveRecord::Base.connection.execute <<SQL | |
CREATE TABLE IF NOT EXISTS students ( | |
id INTEGER PRIMARY KEY AUTOINCREMENT, | |
first_name VARCHAR NOT NULL, | |
last_name VARCHAR NOT NULL, | |
birthday DATE, |
OlderNewer