Class: Inspec::Object::Header
- Inherits:
-
Object
- Object
- Inspec::Object::Header
- Defined in:
- lib/inspec/objects/header.rb
Instance Attribute Summary collapse
-
#header ⇒ Object
Returns the value of attribute header.
Instance Method Summary collapse
-
#initialize(header) ⇒ Header
constructor
A new instance of Header.
- #to_hash ⇒ Object
- #to_ruby ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(header) ⇒ Header
Returns a new instance of Header.
7 8 9 |
# File 'lib/inspec/objects/header.rb', line 7 def initialize(header) @header = header end |
Instance Attribute Details
#header ⇒ Object
Returns the value of attribute header.
5 6 7 |
# File 'lib/inspec/objects/header.rb', line 5 def header @header end |
Instance Method Details
#to_hash ⇒ Object
11 12 13 14 15 |
# File 'lib/inspec/objects/header.rb', line 11 def to_hash { header: header, } end |
#to_ruby ⇒ Object
17 18 19 |
# File 'lib/inspec/objects/header.rb', line 17 def to_ruby header.inspect.to_s end |
#to_s ⇒ Object
21 22 23 |
# File 'lib/inspec/objects/header.rb', line 21 def to_s "Header #{header}" end |