Class: Bugzilla::Bugzilla
Overview
Bugzilla::Bugzilla
Bugzilla::Bugzilla class is to access the Bugzilla::WebService::Bugzilla API that provides functions tell you about Bugzilla in general.
Instance Method Summary collapse
-
#check_version(version_) ⇒ Object
Bugzilla::Bugzilla#check_version(version_).
-
#requires_version(cmd, version_) ⇒ Object
Bugzilla::Bugzilla#requires_version(cmd, version_).
Methods inherited from Skeleton
Constructor Details
This class inherits a constructor from Bugzilla::Skeleton
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Bugzilla::Skeleton
Instance Method Details
#check_version(version_) ⇒ Object
Bugzilla::Bugzilla#check_version(version_)
Returns Array contains the result of the version check and Bugzilla version that is running on.
193 194 195 196 197 198 199 200 201 202 |
# File 'lib/bugzilla.rb', line 193 def check_version(version_) v = version f = false if v.kind_of?(Hash) && v.include?("version") && v['version'] >= "#{version_}" then f = true end [f, v['version']] end |
#requires_version(cmd, version_) ⇒ Object
Bugzilla::Bugzilla#requires_version(cmd, version_)
Raise an exception if the Bugzilla doesn’t satisfy the requirement of the version.
213 214 215 216 |
# File 'lib/bugzilla.rb', line 213 def requires_version(cmd, version_) v = check_version(version_) raise NoMethodError, sprintf("%s is not supported in Bugzilla %s", cmd, v[1]) unless v[0] end |