Class: Inspec::Object::PostBody

Inherits:
Object
  • Object
show all
Defined in:
lib/inspec/objects/post_body.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(post_body) ⇒ PostBody

Returns a new instance of PostBody.



7
8
9
# File 'lib/inspec/objects/post_body.rb', line 7

def initialize(post_body)
  @post_body = post_body
end

Instance Attribute Details

#post_bodyObject

Returns the value of attribute post_body.



5
6
7
# File 'lib/inspec/objects/post_body.rb', line 5

def post_body
  @post_body
end

Instance Method Details

#to_hashObject



11
12
13
14
15
# File 'lib/inspec/objects/post_body.rb', line 11

def to_hash
  {
    post_body: post_body,
  }
end

#to_rubyObject



17
18
19
# File 'lib/inspec/objects/post_body.rb', line 17

def to_ruby
  post_body.inspect.to_s
end

#to_sObject



21
22
23
# File 'lib/inspec/objects/post_body.rb', line 21

def to_s
  "Post Body #{post_body}"
end