lib/versioncake/version_context.rb in versioncake-3.1.0 vs lib/versioncake/version_context.rb in versioncake-3.2.0
- old
+ new
@@ -1,8 +1,9 @@
module VersionCake
class VersionContext
- attr_reader :version, :resource, :result
+ attr_reader :resource, :result
+ attr_accessor :version
def initialize(version, resource, result)
@version, @resource, @result = version, resource, result
end
@@ -11,10 +12,10 @@
@version == @resource.latest_version
end
# Ordered versions that are equal to or lower
# than the requested version.
- def supported_versions
- @resource.supported_versions.sort.reverse.reject { |v| v > @version }
+ def available_versions
+ @resource.available_versions.reverse.reject { |v| v > @version }
end
end
end
\ No newline at end of file