Class: RubyCF::Data
Overview
CF handles raw data different from strings. Ruby treats them the same. Use RubyCF::Data objects to tell the plist encoder to treat the objects as data.
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Class Method Summary collapse
-
.from_file(file) ⇒ Object
Create a RubyCF::Data object from a file path or handle.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(string) ⇒ Data
constructor
Create a RubyCF::Data object from a string.
- #inspect ⇒ Object
Constructor Details
#initialize(string) ⇒ Data
Create a RubyCF::Data object from a string
48 49 50 |
# File 'lib/rubycf_extensions.rb', line 48 def initialize string self.data = string end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
40 41 42 |
# File 'lib/rubycf_extensions.rb', line 40 def data @data end |
Class Method Details
Instance Method Details
#==(other) ⇒ Object
56 57 58 59 60 61 62 |
# File 'lib/rubycf_extensions.rb', line 56 def == other if(other.is_a?(RubyCF::Data)) return other.data == @data else return other == @data end end |
#inspect ⇒ Object
52 53 54 |
# File 'lib/rubycf_extensions.rb', line 52 def inspect "RubyCF::Data #{@data.size} bytes" end |