Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

final assignment complete - tic-tac-toe.rb + tic-tac-toe-steps.rb #69

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
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
ce7a26c
homework 1
Oct 6, 2014
e7a1a93
modified in class homework
Oct 6, 2014
9a564c3
Merge branch 'master' of https://github.com/UWE-Ruby/RubyFall2014
Oct 10, 2014
bc14a02
homework 2
Oct 16, 2014
5029ed0
homework 2
Oct 16, 2014
3588e5a
Merge branch 'master' of https://github.com/UWE-Ruby/RubyFall2014
Oct 17, 2014
1a805cf
week3 homework
Oct 23, 2014
2e5fd71
homework 3
Oct 23, 2014
550266a
Merge branch 'master' of https://github.com/UWE-Ruby/RubyFall2014
Oct 26, 2014
b0ee400
homework 4 submitted
Oct 30, 2014
bbb714a
Merge branch 'master' of https://github.com/UWE-Ruby/RubyFall2014
Oct 31, 2014
95a61e8
Merge branch 'master' of https://github.com/UWE-Ruby/RubyFall2014
Nov 14, 2014
ef8901e
midterm
Nov 14, 2014
5c4643e
ruby gem test
Nov 14, 2014
7472022
week5 rakefile
Nov 14, 2014
78b0293
homework 7
Nov 20, 2014
da8a7ab
midterm removed
Nov 20, 2014
cafdeff
week3 questions updated
Nov 20, 2014
7112921
incomplete tic-tac-toe.rb
Dec 4, 2014
733e035
Merge branch 'master' of https://github.com/UWE-Ruby/RubyFall2014
Dec 4, 2014
ba1532d
step by step approach
Dec 4, 2014
ede6209
expect, truthy and falsey updated
Dec 4, 2014
b458d76
move included
Dec 4, 2014
63fbed1
44passed
Dec 4, 2014
4416018
ruby class gem project
Dec 4, 2014
fe91d04
travis testing
Dec 5, 2014
e8ffeeb
.travis.yml modified
Dec 6, 2014
abdeb07
move .travis.yml
Dec 6, 2014
34a0163
removing travis.yml
Dec 6, 2014
9b5e71f
homework 7
Dec 11, 2014
ec468bc
F2C updated
Dec 11, 2014
a398b1e
updated .travis.yml
Dec 11, 2014
9f217c1
final assignment - tic-tac-toe.rb
Dec 11, 2014
f0f9278
tic-tac-toe-steps modified
Dec 11, 2014
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
10 changes: 10 additions & 0 deletions F2C/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: ruby
rvm:
# - "1.8.7"
- "1.9.2"
- "1.9.3"
# - jruby-18mode # JRuby in 1.8 mode
- jruby-19mode # JRuby in 1.9 mode
# - rbx
# uncomment this line if your project needs to run something other than `rake`:
script: rspec F2C.spec.rb
1 change: 1 addition & 0 deletions F2C/.yardoc/checksums
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib/F2C.rb be93e400bb67a1f65b7d61c9eeb5f60fbfdda0cb
Binary file added F2C/.yardoc/object_types
Binary file not shown.
Binary file added F2C/.yardoc/objects/root.dat
Binary file not shown.
Binary file added F2C/.yardoc/proxy_types
Binary file not shown.
Binary file added F2C/F2C-0.0.0.gem
Binary file not shown.
Binary file added F2C/F2C-0.0.1.gem
Binary file not shown.
Binary file added F2C/F2C-0.0.2.gem
Binary file not shown.
Binary file added F2C/F2C-0.0.3.gem
Binary file not shown.
12 changes: 12 additions & 0 deletions F2C/F2C.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Gem::Specification.new do |s|
s.name = "F2C"
s.version = '0.0.3'
s.date = '2014-11-23'
s.authors = ["Kenny Lu"]
s.email = ["[email protected]"]
s.description = "Ruby class project - F2C is a simple tool that converts Fahrenheit to Celsius and vice versa"
s.summary = "Ruby class project - Fahrenheit to Celsius conversion and vice versa"
s.homepage = 'http://rubygems.org/gems/F2C'
s.licenses = 'MIT'
s.files = ["lib/F2C.rb"]
end
18 changes: 18 additions & 0 deletions F2C/F2C.spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# spec file to test the math of the temperature conversion

require 'F2C.rb'

describe Convert do

it "Fahrenheit to Celsius" do
x = Convert.F2C(83)
#expect(x).to eq "83 Fahrenheit is 28 Celsius"
x.should eq "83 Fahrenheit is 28 Celsius"
end

it "Celsius to Fahrenheit" do
x = Convert.C2F(18)
x.should eq "18 Celsius is 64 Fahrenheit"
end

end
6 changes: 6 additions & 0 deletions F2C/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source "https://rubygems.org"

gem "bundler" , "~> 1.7.4"
gemspec
gem "rspec" , "~> 2.8.0"
gem "rake" , "~> 0.9.2.2" #included if using rake
35 changes: 35 additions & 0 deletions F2C/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
F2C
=============

[![Build Status](https://travis-ci.org/influxdb/influxdb-ruby.png?branch=master)](https://travis-ci.org/lukenny/F2C)

Summary
-------
```
F2C converts Fahrenheit to Celsius and vice versa
Fahrenheit to Celsius formulas http://www.manuelsweb.com/temp.htm
```

Installation
------------
```
$ [sudo] gem install F2C
```

Usage
-----
```
launch irb
require 'F2C'
Convert.F2C(value) #converts Fahrenheit to Celsius
Convert.C2F(value) #converts Celsius to Fahrenheit
```
Output
------
```
$ irb
irb(main):001:0> require "F2C"
=> true
irb(main):002:0> Convert.F2C 100
=> "100 Fahrenheit is 38 Celsius"
```
251 changes: 251 additions & 0 deletions F2C/doc/Convert.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Module: Convert

&mdash; Documentation by YARD 0.8.7.6

</title>

<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />

<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
hasFrames = window.top.frames.main ? true : false;
relpath = '';
framesUrl = "frames.html#!Convert.html";
</script>


<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>

<script type="text/javascript" charset="utf-8" src="js/app.js"></script>


</head>
<body>
<div id="header">
<div id="menu">

<a href="_index.html">Index (C)</a> &raquo;


<span class="title">Convert</span>


<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

<div id="search">

<a class="full_list_link" id="class_list_link"
href="class_list.html">
Class List
</a>

<a class="full_list_link" id="method_list_link"
href="method_list.html">
Method List
</a>

<a class="full_list_link" id="file_list_link"
href="file_list.html">
File List
</a>

</div>
<div class="clear"></div>
</div>

<iframe id="search_frame"></iframe>

<div id="content"><h1>Module: Convert



</h1>

<dl class="box">








<dt class="r1 last">Defined in:</dt>
<dd class="r1 last">lib/F2C.rb</dd>

</dl>
<div class="clear"></div>









<h2>
Class Method Summary
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
</h2>

<ul class="summary">

<li class="public ">
<span class="summary_signature">

<a href="#C2F-class_method" title="C2F (class method)">+ (Object) <strong>C2F</strong>(value) </a>



</span>









<span class="summary_desc"><div class='inline'></div></span>

</li>


<li class="public ">
<span class="summary_signature">

<a href="#F2C-class_method" title="F2C (class method)">+ (Object) <strong>F2C</strong>(value) </a>



</span>









<span class="summary_desc"><div class='inline'>
<p>Overveiw F2C converts Fahrenheit to Celsius and vice versa Fahrenheit to
Celsius formulas <a
href="http://www.manuelsweb.com/temp.htm">www.manuelsweb.com/temp.htm</a>.</p>
</div></span>

</li>


</ul>




<div id="class_method_details" class="method_details_list">
<h2>Class Method Details</h2>


<div class="method_details first">
<h3 class="signature first" id="C2F-class_method">

+ (<tt>Object</tt>) <strong>C2F</strong>(value)





</h3><table class="source_code">
<tr>
<td>
<pre class="lines">


18
19
20
21</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/F2C.rb', line 18</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='const'>C2F</span> <span class='id identifier rubyid_value'>value</span>
<span class='id identifier rubyid_converted_value'>converted_value</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span> <span class='op'>*</span> <span class='float'>9.0</span><span class='op'>/</span><span class='float'>5.0</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='int'>32</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_round'>round</span>
<span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_value'>value</span><span class='embexpr_end'>}</span><span class='tstring_content'> Celsius is </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_converted_value'>converted_value</span><span class='embexpr_end'>}</span><span class='tstring_content'> Fahrenheit</span><span class='tstring_end'>&quot;</span></span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>

<div class="method_details ">
<h3 class="signature " id="F2C-class_method">

+ (<tt>Object</tt>) <strong>F2C</strong>(value)





</h3><div class="docstring">
<div class="discussion">

<p>Overveiw F2C converts Fahrenheit to Celsius and vice versa Fahrenheit to
Celsius formulas <a
href="http://www.manuelsweb.com/temp.htm">www.manuelsweb.com/temp.htm</a></p>

<p>How to use it gem install F2C launch irb require &#39;F2C&#39;
Convert.F2C(value) - “converts Fahrenheit to Celsius” Convert.C2F(value) -
“converts Celsius to Fahrenheit”</p>


</div>
</div>
<div class="tags">


</div><table class="source_code">
<tr>
<td>
<pre class="lines">


13
14
15
16</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/F2C.rb', line 13</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='const'>F2C</span> <span class='id identifier rubyid_value'>value</span>
<span class='id identifier rubyid_converted_value'>converted_value</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span> <span class='op'>-</span> <span class='int'>32</span><span class='rparen'>)</span> <span class='op'>*</span> <span class='float'>5.0</span><span class='op'>/</span><span class='float'>9.0</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_round'>round</span>
<span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_value'>value</span><span class='embexpr_end'>}</span><span class='tstring_content'> Fahrenheit is </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_converted_value'>converted_value</span><span class='embexpr_end'>}</span><span class='tstring_content'> Celsius</span><span class='tstring_end'>&quot;</span></span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>

</div>

</div>

<div id="footer">
Generated on Sun Nov 23 15:59:54 2014 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.0.0).
</div>

</body>
</html>
Loading