Top Level Namespace
Defined Under Namespace
Modules: Kurchatov Classes: Mashie
Instance Method Summary collapse
-
#get_redhatish_platform(contents) ⇒ Object
- Author
- Adam Jacob (<[email protected]>) Copyright
-
Copyright © 2008 Opscode, Inc.
- #get_redhatish_version(contents) ⇒ Object
Instance Method Details
#get_redhatish_platform(contents) ⇒ Object
- Author
-
Adam Jacob (<[email protected]>)
- Copyright
-
Copyright © 2008 Opscode, Inc.
- License
-
Apache License, Version 2.0
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
19 20 21 |
# File 'lib/ohai/plugins/linux/platform.rb', line 19 def get_redhatish_platform(contents) contents[/^Red Hat/i] ? 'redhat' : contents[/(\w+)/i, 1].downcase end |
#get_redhatish_version(contents) ⇒ Object
23 24 25 |
# File 'lib/ohai/plugins/linux/platform.rb', line 23 def get_redhatish_version(contents) contents[/Rawhide/i] ? contents[/((\d+) \(Rawhide\))/i, 1].downcase : contents[/release ([\d\.]+)/, 1] end |