Version: remove pointless private call
This commit is contained in:
parent
15562c8876
commit
ba2717fb19
@ -91,18 +91,16 @@ class Version
|
|||||||
end
|
end
|
||||||
alias_method :to_str, :to_s
|
alias_method :to_str, :to_s
|
||||||
|
|
||||||
def self.parse spec
|
|
||||||
version = _parse(spec)
|
|
||||||
Version.new(version, true) unless version.nil?
|
|
||||||
end
|
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def to_a
|
def to_a
|
||||||
@array ||= @version.scan(/\d+|[a-zA-Z]+/).map { |e| VersionElement.new(e) }
|
@array ||= @version.scan(/\d+|[a-zA-Z]+/).map { |e| VersionElement.new(e) }
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
def self.parse spec
|
||||||
|
version = _parse(spec)
|
||||||
|
Version.new(version, true) unless version.nil?
|
||||||
|
end
|
||||||
|
|
||||||
def self._parse spec
|
def self._parse spec
|
||||||
spec = Pathname.new(spec) unless spec.is_a? Pathname
|
spec = Pathname.new(spec) unless spec.is_a? Pathname
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user