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
| require "bundler/capistrano" | |
| set :application, "studentbody" | |
| set :repository, "https://github.com/xfernandox/studentbody.git" | |
| set :user, 'josh' | |
| set :deploy_to, "/home/#{ user }/#{ application }" | |
| set :use_sudo, false | |
| set :scm, :git | |
| # Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none` |
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 Song | |
| attr_accessor :name | |
| @@song_library = [] | |
| def self.all | |
| @@song_library | |
| end | |
| def initialize(name) |
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
| songs = [ | |
| "The Phoenix - 1901", | |
| "Tokyo Police Club - Wait Up", | |
| "Sufjan Stevens - Too Much", | |
| "The Naked and the Famous - Young Blood", | |
| "(Far From) Home - Tiga", | |
| "The Cults - Abducted", | |
| "The Phoenix - Consolation Prizes" | |
| ] |
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 Song | |
| attr_accessor :name | |
| @@song_library = [] | |
| def self.all | |
| @@song_library | |
| end | |
| def initialize(name) |
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 Song | |
| attr_accessor :name | |
| @@song_library = [] | |
| def add_to_library | |
| @@song_library << self | |
| end | |
| def self.all |
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
| require 'open-uri' | |
| require 'nokogiri' | |
| require 'sqlite3' | |
| doc = Nokogiri::HTML(open("http://students.flatironschool.com/davidbaker.html")) | |
| name = doc.css('h1').text | |
| name = name.split(" ") | |
| first_name = name[0] |
NewerOlder