Skip to content

Instantly share code, notes, and snippets.

@ianyang
ianyang / GA Day2-3.md
Created June 20, 2013 02:02
Array, Hashes & Loops

General

  • method_name() to run a method with no parameters
  • .split splits a string into an array based on spaces
    • .split() splits a string into an array with the value inside the parens
    • "\n" is class block
  • Make sure the remember that an array starts with 0, and so the top number needs to be subtracted by 1

Title: Quiz

Set opacity to 50% for an elementin CSS?

opacity: 0.5;

Question: Print a colorful thing in terminal.

fortune | cowsay | lolcat

=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')

#Blackbuck - p2p delivery platform

Blackbuck combines the best of Lyft and Postmates with a complete p2p take on delivering parcels within a city.

###How it works###

Individuals can sign up freely as users that can act as drivers or just customers.

Customers can create delivery jobs in 1 hour windows for the product to be picked up and delivered instantly. Delivery time is calculated in real time using Google Maps with 50% upper margin. Customer average review score is displayed.