Class: Pangea::Internal::Util::SerializationAdapter Private
- Inherits:
-
Object
- Object
- Pangea::Internal::Util::SerializationAdapter
- Defined in:
- lib/pangea/internal/util.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #inner ⇒ Pathname, IO readonly private
Instance Method Summary collapse
-
#initialize(inner) ⇒ SerializationAdapter
constructor
private
A new instance of SerializationAdapter.
- #to_json(*a) ⇒ String private
- #to_yaml(*a) ⇒ String private
Constructor Details
#initialize(inner) ⇒ SerializationAdapter
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SerializationAdapter.
341 |
# File 'lib/pangea/internal/util.rb', line 341 def initialize(inner) = @inner = inner |
Instance Attribute Details
#inner ⇒ Pathname, IO (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
326 327 328 |
# File 'lib/pangea/internal/util.rb', line 326 def inner @inner end |
Instance Method Details
#to_json(*a) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
331 |
# File 'lib/pangea/internal/util.rb', line 331 def to_json(*a) = (inner.is_a?(IO) ? inner.read : inner.read(binmode: true)).to_json(*a) |
#to_yaml(*a) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
336 |
# File 'lib/pangea/internal/util.rb', line 336 def to_yaml(*a) = (inner.is_a?(IO) ? inner.read : inner.read(binmode: true)).to_yaml(*a) |