Class: Sofia::Types::Body

Inherits:
Object
  • Object
show all
Defined in:
lib/sofia/types/body.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body = nil) ⇒ Body

: (?untyped? body) -> void



12
13
14
# File 'lib/sofia/types/body.rb', line 12

def initialize(body = nil)
  @body = validate_and_normalize(body) #:  Hash[String, untyped]
end

Instance Attribute Details

#bodyObject (readonly)

: Hash[String, untyped]



9
10
11
# File 'lib/sofia/types/body.rb', line 9

def body
  @body
end

Instance Method Details

#to_hObject

: -> Hash[String, untyped]



17
18
19
# File 'lib/sofia/types/body.rb', line 17

def to_h
  @body.dup
end