This file contains 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 'pry' | |
class Car | |
def initialize | |
@classification = "A Car" | |
binding.pry | |
end | |
def describe | |
"I am #{@classification}, of make #{@make}" |
This file contains 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 student_serial(i) | |
new_hash = {} | |
i.each_with_index do |value, index| | |
# we will add a conditional pry to | |
# start a session when our value is nil | |
binding.pry if value.nil? | |
new_hash["#{value}"] = index | |
end |
This file contains 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
[06:57:06] ~ | |
// ♥ Pry | |
[1] pry(main)> whereami | |
At the top level. | |
[2] pry(main)> cd Pry | |
[3] pry(Pry):1> whereami | |
Inside Pry. | |
[4] pry(Pry):1> |
This file contains 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
[07:11:51] ~ | |
// ♥ Pry | |
[1] pry(main)> cd Pry | |
[2] pry(Pry):1> ? | |
From: /Users/edwardezekiel/.rvm/gems/ruby-2.3.3/gems/pry-0.11.3/lib/pry/pry_instance.rb @ line 2: | |
Class name: Pry | |
Number of monkeypatches: 6. Use the `-a` option to display all available monkeypatches | |
Number of lines: 22 |
This file contains 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
[07:13:00] ~ | |
// ♥ Pry | |
[1] pry(main)> cd Pry | |
[2] pry(Pry):1> $ | |
From: /Users/edwardezekiel/.rvm/gems/ruby-2.3.3/gems/pry-0.11.3/lib/pry/pry_instance.rb @ line 24: | |
Class name: Pry | |
Number of monkeypatches: 6. Use the `-a` option to display all available monkeypatches | |
Number of lines: 643 |
This file contains 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 Band < ActiveRecord::Base | |
has_many :sessions | |
has_many :concerts, through: :sessions | |
end |
This file contains 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 get_category | |
doc = Nokogiri::HTML(open("https://www.ruby-toolbox.com")) | |
doc.css(".category-group").each do |category| | |
puts category.css("h3").text | |
end | |
get_subcategory_screen | |
end |
This file contains 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
#app/view/new.html.erb | |
<%= form_for @employee do | f | %> | |
<%= f.label :name %> | |
<%= f.text_field :name %> | |
<%= f.label :dog %> | |
<%= f.collection_select :dog_id, @dogs, :id, :name %> | |
<%= f.submit %> | |
<% end %> |
This file contains 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
fetch(url) | |
.then((resp) => resp.json()) // Transform the data into json | |
.then(function(data) { | |
// Create and append the li's to the ul | |
}) | |
}) |
This file contains 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
fetch(url) |
OlderNewer