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
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(string) ⇒ Data
constructor
A new instance of Data.
- #inspect ⇒ Object
Constructor Details
#initialize(string) ⇒ Data
Returns a new instance of Data.
24 25 26 |
# File 'lib/rubycf_extensions.rb', line 24 def initialize string self.data = string end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
18 19 20 |
# File 'lib/rubycf_extensions.rb', line 18 def data @data end |
Class Method Details
Instance Method Details
#==(other) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/rubycf_extensions.rb', line 32 def == other if(other.is_a?(RubyCF::Data)) return other.data == @data else return other == @data end end |
#inspect ⇒ Object
28 29 30 |
# File 'lib/rubycf_extensions.rb', line 28 def inspect "RubyCF::Data #{@data.size} bytes" end |