Class: Inspec::Resources::Lines
- Inherits:
-
Object
- Object
- Inspec::Resources::Lines
- Defined in:
- lib/inspec/resources/mysql_session.rb,
lib/inspec/resources/ibmdb2_session.rb,
lib/inspec/resources/mongodb_session.rb,
lib/inspec/resources/postgres_session.rb,
lib/inspec/resources/cassandradb_session.rb
Instance Attribute Summary collapse
-
#exit_status ⇒ Object
readonly
Returns the value of attribute exit_status.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize(raw, desc, exit_status) ⇒ Lines
constructor
A new instance of Lines.
- #lines ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(raw, desc, exit_status) ⇒ Lines
Returns a new instance of Lines.
10 11 12 13 14 15 16 17 |
# File 'lib/inspec/resources/mysql_session.rb', line 10 def initialize(raw, desc, exit_status) @output = raw @desc = desc @exit_status = exit_status # backwards compatibility @stdout = raw @stderr = raw end |
Instance Attribute Details
#exit_status ⇒ Object (readonly)
Returns the value of attribute exit_status.
8 9 10 |
# File 'lib/inspec/resources/mysql_session.rb', line 8 def exit_status @exit_status end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
8 9 10 |
# File 'lib/inspec/resources/mysql_session.rb', line 8 def output @output end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
5 6 7 |
# File 'lib/inspec/resources/mongodb_session.rb', line 5 def params @params end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
8 9 10 |
# File 'lib/inspec/resources/mysql_session.rb', line 8 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
8 9 10 |
# File 'lib/inspec/resources/mysql_session.rb', line 8 def stdout @stdout end |
Instance Method Details
#lines ⇒ Object
19 20 21 |
# File 'lib/inspec/resources/mysql_session.rb', line 19 def lines output.split("\n") end |
#to_s ⇒ Object
23 24 25 |
# File 'lib/inspec/resources/mysql_session.rb', line 23 def to_s @desc end |