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
// helpers | |
function areEnemies(robot, sighted) { | |
var sightedIsChild = (robot.id == sighted.parentId); | |
var sightedIsParent = (robot.parentId == sighted.id); | |
return !(sightedIsChild || sightedIsParent); | |
}; | |
function baseStep(robot) { |
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 save_deed_and_related_documents(deed) | |
unless deed.make_reference.nil? | |
deed.make_reference.each do | reference | | |
reference.each do | record | | |
puts record | |
end | |
end | |
end | |
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
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 |
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 save_deed_and_related_documents(deed) | |
unless deed.make_reference.nil? | |
deed.make_reference.each do | reference | | |
puts reference | |
end | |
end | |
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
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 |
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
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 |
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
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"] |
NewerOlder