Skip to content
Snippets Groups Projects
Verified Commit 5d7a3ca8 authored by Jeffrey Phillips Freeman's avatar Jeffrey Phillips Freeman :boom:
Browse files

Added empty? to paths

parent 64d9fc92
No related branches found
No related tags found
No related merge requests found
......@@ -68,6 +68,11 @@ module Apex
return @path_array.length
end
public
def empty?
return @path_array.empty?
end
public
def eql?(other)
raise ArgumentError.new("The argument must be of type Path (or a child class).") if not other.kind_of? Path
......
......@@ -3,6 +3,6 @@ module Apex
module Path
include Abstractify::Abstract
abstract :each, :[], :length, :eql?, :==, :to_s, :to_string_array, :to_array
abstract :each, :[], :length, :eql?, :==, :to_s, :to_string_array, :to_array, :empty?
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment