Class: Sofia::Types::Body
- Inherits:
-
Object
- Object
- Sofia::Types::Body
- Defined in:
- lib/sofia/types/body.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
: Hash[String, untyped].
Instance Method Summary collapse
-
#initialize(body = nil) ⇒ Body
constructor
: (?untyped? body) -> void.
-
#to_h ⇒ Object
: -> Hash[String, untyped].
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
#body ⇒ Object (readonly)
: Hash[String, untyped]
9 10 11 |
# File 'lib/sofia/types/body.rb', line 9 def body @body end |
Instance Method Details
#to_h ⇒ Object
: -> Hash[String, untyped]
17 18 19 |
# File 'lib/sofia/types/body.rb', line 17 def to_h @body.dup end |