Skip to content

Instantly share code, notes, and snippets.

@benhoskings
Created March 4, 2009 01:29
Show Gist options
  • Save benhoskings/73655 to your computer and use it in GitHub Desktop.
Save benhoskings/73655 to your computer and use it in GitHub Desktop.
def assign_nesting_resources
@hammock_nesting_scopes.map {|scope|
scope.kick
}.confirm {|results|
results.length == 1
}.map {|results|
results.first
}.each {|result|
assign_entity result
}.empty?
end
def assign_nesting_resources
results = @hammock_nesting_scopes.map {|scope|
scope.kick
}
results.map {|results|
results.first
}.all? {|result|
assign_entity result
} if results.all? {|result| result.length == 1 }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment