class Inspec::Resources::Passwd
Attributes
content[R]
lines[R]
params[R]
Public Class Methods
new(path = nil, opts = nil)
click to toggle source
# File lib/inspec/resources/passwd.rb, line 43 def initialize(path = nil, opts = nil) opts ||= {} @path = path || "/etc/passwd" @content = opts[:content] || read_file_content(@path, allow_empty: true) @lines = @content.to_s.split("\n") @params = parse_passwd(@content) end
Public Instance Methods
to_s()
click to toggle source
# File lib/inspec/resources/passwd.rb, line 69 def to_s "/etc/passwd" end