Class: Inspec::Resources::Lines

Inherits:
Object
  • Object
show all
Defined in:
lib/inspec/resources/postgres_session.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw, desc) ⇒ Lines

Returns a new instance of Lines.



9
10
11
12
# File 'lib/inspec/resources/postgres_session.rb', line 9

def initialize(raw, desc)
  @output = raw
  @desc = desc
end

Instance Attribute Details

#outputObject (readonly)

Returns the value of attribute output.



7
8
9
# File 'lib/inspec/resources/postgres_session.rb', line 7

def output
  @output
end

Instance Method Details

#linesObject



14
15
16
# File 'lib/inspec/resources/postgres_session.rb', line 14

def lines
  output.split("\n")
end

#to_sObject



18
19
20
# File 'lib/inspec/resources/postgres_session.rb', line 18

def to_s
  @desc
end