Class: Nanaimo::Data

Inherits:
Object show all
Defined in:
lib/nanaimo/object.rb

Overview

A data object in a Plist, represented by a binary-encoded string.

Instance Attribute Summary

Attributes inherited from Object

#annotation, #value

Instance Method Summary collapse

Methods inherited from Object

#<=>, #==, #hash, #to_s

Constructor Details

#initialize(value, annotation) ⇒ Data

Returns a new instance of Data.


77
78
79
80
# File 'lib/nanaimo/object.rb', line 77

def initialize(value, annotation)
  value &&= value.dup.force_encoding(Encoding::BINARY)
  super(value, annotation)
end

Instance Method Details

#as_rubyObject


82
83
84
# File 'lib/nanaimo/object.rb', line 82

def as_ruby
  value
end