This file contains hidden or 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
#test of stacks and flows. | |
require "stack_flow_methods.rb" | |
Shoes.app do | |
#this flow shows up OK | |
flow :width => 300, :height => 100 do | |
background coral | |
#why don't these stacks show up in the flow I created. | |
stack :width => "50%" do background blueviolet | |
end | |
stack :width => "-50%" do background crimson |
This file contains hidden or 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
def age_method(age) | |
year = 314712000 | |
puts "you are " + (age*year).to_s + " seconds old" | |
puts "you are " + (year/3600).to_s + " hours old" | |
end | |
puts "What is your age?" | |
age = gets.chomp | |
age_method(age) |
This file contains hidden or 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
class Dragon | |
def initialize name | |
@name = name | |
@asleep = false | |
@stuff_in_belly = 10 | |
@stuff_in_guts = 0 | |
puts @name + " is born!" | |
end | |
This file contains hidden or 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
# the variables. a forward string | |
#the backward empty string. | |
#the holding array | |
forwards = "hello this is a string. In a moment it will be reversed without using the 'reverse' method." | |
backwards = "" | |
holding_array = [] |
This file contains hidden or 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
class Todo | |
def initialize item | |
#what we need for a new item on the todo list. | |
#when the item was created.(optional) | |
@time_created = Time.now | |
#the string that is displayed that's identified. | |
@item = item | |
#whether it's done or not | |
@done = false |
This file contains hidden or 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
class Todo | |
attr_accessor :item, :done, :time_created | |
def initialize item_name | |
#what we need for a new item on the todo list. | |
#when the item was created.(optional) | |
@time_created = Time.now | |
#the string that is displayed that's identified. | |
@item = item_name | |
#whether it's done or not |
This file contains hidden or 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
timer = Proc.new do | |
|time, deadline| | |
time = Time.now | |
deadline = time + 5 | |
while time != deadline | |
time = Time.now | |
end |
This file contains hidden or 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
class Fight | |
def initialize | |
Player.new | |
Monster.new | |
end #end of the initialize method. | |
class Player | |
attr_accessor :ac, :attack, :hp |
This file contains hidden or 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
p {color: red;} | |
html { background: silver;} | |
.center { | |
width: 75%; | |
height: 100%; | |
float: center; | |
background-color: white; | |
margin-top: -20px; |
This file contains hidden or 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> | |
<html> | |
<head lang="en"> | |
<link text="css/text" rel="stylesheet" href="stylesheet.css"></link> | |
<meta charset="utf-8"> | |
<title>Custom Plunker</title> | |
</head> | |
<div class="center"> | |
<p>Here is a thing too</p> |
OlderNewer