Class: Inspec::Resources::OSResource
- Inherits:
-
Object
- Object
- Inspec::Resources::OSResource
- Defined in:
- lib/resources/os.rb
Instance Method Summary collapse
- #[](name) ⇒ Object
-
#params ⇒ Object
helper to collect a hash object easily.
- #to_s ⇒ Object
Instance Method Details
#[](name) ⇒ Object
30 31 32 33 34 |
# File 'lib/resources/os.rb', line 30 def [](name) # convert string to symbol name = name.to_sym if name.is_a? String inspec.backend.os[name] end |
#params ⇒ Object
helper to collect a hash object easily
45 46 47 48 49 50 51 52 |
# File 'lib/resources/os.rb', line 45 def params { name: inspec.backend.os[:name], family: inspec.backend.os[:family], release: inspec.backend.os[:release], arch: inspec.backend.os[:arch], } end |
#to_s ⇒ Object
54 55 56 |
# File 'lib/resources/os.rb', line 54 def to_s 'Operating System Detection' end |