Class: Nanaimo::Plist
- Inherits:
-
Object
- Object
- Nanaimo::Plist
- Defined in:
- lib/nanaimo/plist.rb
Overview
A Plist.
Instance Attribute Summary collapse
-
#file_type ⇒ String
The encoding of the plist.
-
#root_object ⇒ Nanaimo::Object
The root level object in the plist.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#as_ruby ⇒ Object
A native Ruby object representation of the plist.
- #hash ⇒ Object
-
#initialize(root_object = nil, file_type = nil) ⇒ Plist
constructor
A new instance of Plist.
Constructor Details
#initialize(root_object = nil, file_type = nil) ⇒ Plist
Returns a new instance of Plist.
15 16 17 18 |
# File 'lib/nanaimo/plist.rb', line 15 def initialize(root_object = nil, file_type = nil) @root_object = root_object @file_type = file_type end |
Instance Attribute Details
#file_type ⇒ String
Returns The encoding of the plist.
13 14 15 |
# File 'lib/nanaimo/plist.rb', line 13 def file_type @file_type end |
#root_object ⇒ Nanaimo::Object
Returns The root level object in the plist.
9 10 11 |
# File 'lib/nanaimo/plist.rb', line 9 def root_object @root_object end |
Instance Method Details
#==(other) ⇒ Object
20 21 22 23 |
# File 'lib/nanaimo/plist.rb', line 20 def ==(other) return unless other.is_a?(Nanaimo::Plist) file_type == other.file_type && root_object == other.root_object end |
#as_ruby ⇒ Object
Returns A native Ruby object representation of the plist.
31 32 33 |
# File 'lib/nanaimo/plist.rb', line 31 def as_ruby root_object.as_ruby end |
#hash ⇒ Object
25 26 27 |
# File 'lib/nanaimo/plist.rb', line 25 def hash root_object.hash end |