Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jaredfolkins's full-sized avatar
🧂
💡

Jared Folkins jaredfolkins

🧂
💡
View GitHub Profile
def save_deed_and_related_documents(deed)
unless deed.make_reference.nil?
deed.make_reference.each do | reference |
deed.each do | record |
puts record
end
end
end
end
def save_deed_and_related_documents(deed)
unless deed.make_reference.nil?
deed.make_reference.each do | reference |
puts reference
end
end
end
describe "#create_nokogiri_object" do
it "if supplied document is not a nokogiri object" do
document = DeschutesDocument.new('<html>')
document.nokogiri_document.should be_a_kind_of(Nokogiri)
end
end
Failure/Error: document.nokogiri_document.should be_a_kind_of(Nokogiri)
expected #<Nokogiri::HTML::Document:0x8041d478 name="document" children=[#<Nokogiri::XML::DTD:0x80a01a24 name="html">, #<Nokogiri::XML::Element:0x80b02a2c name="html">]> to be a kind of Nokogiri
A few examples will help to clarify these operations. Let's begin by creating two arrays:
operating_systems = ["Fedora", "SuSE", "RHEL", "Windows", "MacOS"]
linux_systems = ["RHEL", "SuSE", "PCLinuxOS", "Ubuntu", "Fedora"]
Now, we can create a union of the two arrays:
operating_systems | linux_systems
=> ["Fedora", "SuSE", "RHEL", "Windows", "MacOS", "PCLinuxOS", "Ubuntu"]