Skip to content
This repository was archived by the owner on Dec 1, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0154e1e
Update week1/homework/questions.txt
phamdt Oct 16, 2012
85b9bdc
Update week1/homework/questions.txt
phamdt Oct 16, 2012
2cdf620
Update week1/homework/strings_and_rspec_spec.rb
phamdt Oct 16, 2012
e3631c3
Update week1/homework/strings_and_rspec_spec.rb
phamdt Oct 23, 2012
b30632c
Merge branch 'master' of git://github.com/UWE-Ruby/RubyFall2012 into …
phamdt Oct 24, 2012
868083f
Changes to be committed:
phamdt Oct 24, 2012
d40957c
Changes to be committed:
phamdt Oct 24, 2012
dba63c6
Merge branch 'master' of git://github.com/UWE-Ruby/RubyFall2012
phamdt Oct 24, 2012
50d43db
modified: week2/homework/questions.txt
phamdt Oct 24, 2012
62440fb
modified: ../exercises/monster.rb
phamdt Oct 31, 2012
c3859b2
Merge branch 'master' of git://github.com/UWE-Ruby/RubyFall2012 into …
phamdt Nov 12, 2012
d32f9cc
Merge branch 'master' of git://github.com/UWE-Ruby/RubyFall2012
phamdt Nov 12, 2012
d77bc6c
On branch master
phamdt Nov 21, 2012
00e9468
On branch master
phamdt Nov 21, 2012
1eb5e31
Merge branch 'master' of git://github.com/UWE-Ruby/RubyFall2012 into …
phamdt Nov 21, 2012
13517a8
Merge branch 'master' of git://github.com/UWE-Ruby/RubyFall2012 into …
phamdt Nov 26, 2012
9dc3b65
On branch answers
phamdt Nov 27, 2012
fdcab12
On branch answers
phamdt Nov 27, 2012
e1853cd
Merge branch 'answers'
phamdt Nov 28, 2012
87e77d4
On branch master
phamdt Nov 28, 2012
7466efe
On branch master
phamdt Nov 28, 2012
a1a9963
Merge branch 'master' of git://github.com/UWE-Ruby/RubyFall2012 into …
phamdt Nov 28, 2012
5aeb7b6
Merge branch 'answers'
phamdt Nov 28, 2012
643186b
On branch master
phamdt Nov 28, 2012
3e49465
On branch master
phamdt Nov 28, 2012
ad10497
On branch master
phamdt Nov 28, 2012
2b47415
On branch master
phamdt Nov 28, 2012
aa9a4af
removed midterm directory
phamdt Dec 2, 2012
36656c2
On branch master
phamdt Dec 3, 2012
0ecb5d0
On branch master
phamdt Dec 4, 2012
e04c518
On branch master
phamdt Dec 9, 2012
96638fb
On branch master
phamdt Dec 9, 2012
4b09efb
On branch master
phamdt Dec 10, 2012
84b410e
I don't understand what I'm doing wrong
phamdt Dec 11, 2012
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions mid_term/even_number.rb

This file was deleted.

27 changes: 0 additions & 27 deletions mid_term/even_number_spec.rb

This file was deleted.

74 changes: 0 additions & 74 deletions mid_term/mid_term_spec.rb

This file was deleted.

56 changes: 0 additions & 56 deletions mid_term/questions.txt

This file was deleted.

78 changes: 0 additions & 78 deletions mid_term/thanksgiving_dinner.rb

This file was deleted.

24 changes: 0 additions & 24 deletions mid_term/turkey.rb

This file was deleted.

9 changes: 0 additions & 9 deletions mid_term/wish_list.rb

This file was deleted.

18 changes: 0 additions & 18 deletions mid_term/wish_list_spec.rb

This file was deleted.

11 changes: 11 additions & 0 deletions test_gem/dp_test_gem.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Gem::Specification.new do |s|
s.name = 'dp_test_gem'
s.version = '0.0.1'
s.date = '2012-11-19'
s.summary = 'gettin crazy with test gems'
s.description = 'a tool to help me understand gem creation'
s.authors = ["danny pham"]
s.email = 'pham.danny.t@gmail.com'
s.homepage = 'http://rubygems.org/gems/test_gem'
s.files = ["lib/dp_test_gem.rb"]
end
3 changes: 3 additions & 0 deletions test_gem/lib/dp_test_gem.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env ruby

puts "hello gem!"
17 changes: 17 additions & 0 deletions week1/homework/questions.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
<<<<<<< HEAD
1. What is an object?
An object is an instance of a class
2. What is a variable?
With Ruby, it is a reference to an object
3. What is the difference between an object and a class?
an object is a specific creation of related state and behavior created with the blueprint, or its class
4. What is a String?
String is a class so a string is an instance of String. A string represents text.
5. What are three messages that I can send to a string object? Hint: think methods
dup, freeze, [](0)
6. What are two ways of defining a String literal?
with single quotations and with double quotations
Bonus: What is the difference between the two?
double quotations allow for interpolation and more escape sequences
=======
Please read:
Chapter 3 Classes, Objects, and Variables
p.90-94 Strings
Expand All @@ -22,3 +38,4 @@ split - returns an array of strings made up of the original string separated on
6. What are two ways of defining a String literal? Bonus: What is the difference between the two?
Single quotes ex: '' and Double quotes ex: "". The single qoutes allow for 2 escape characters: \' and \\ . The double qouted string literal allows for many different escaped special characters (like \n is a line break) and allows for string interpolation, or the injection of evaluated Ruby code into the string ex: "Hello #{my_name}". The single qouted string takes up much less memory than a doulbe qouted string with interpolation. Without interpolation, both are about the same.

>>>>>>> 476e4b543ee68aad8bb809afdfe2207afd39e8e5
13 changes: 13 additions & 0 deletions week1/homework/strings_and_rspec_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
@my_string = "Renée is a fun teacher. Ruby is a really cool programming language"
end
it "should be able to count the charaters" do
<<<<<<< HEAD
count = @my_string.length
count.should eq @my_string.length.size
end
it "should be able to split on the . charater" do
result = @my_string.split("\.")
result.should have(2).items
end
it "should be able to give the encoding of the string" do
encoding = @my_string.encoding
encoding.should eq (Encoding.find("UTF-8"))
=======
@my_string.should have(@my_string.size).characters
end
it "should be able to split on the . charater" do
Expand All @@ -21,6 +33,7 @@
end
it "should be able to give the encoding of the string" do
@my_string.encoding.should eq (Encoding.find("UTF-8"))
>>>>>>> 476e4b543ee68aad8bb809afdfe2207afd39e8e5
end
end
end
Loading