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.
13 14 15 16 |
# File 'lib/nanaimo/plist.rb', line 13 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.
11 12 13 |
# File 'lib/nanaimo/plist.rb', line 11 def file_type @file_type end |
#root_object ⇒ Nanaimo::Object
Returns The root level object in the plist.
7 8 9 |
# File 'lib/nanaimo/plist.rb', line 7 def root_object @root_object end |
Instance Method Details
#==(other) ⇒ Object
18 19 20 21 |
# File 'lib/nanaimo/plist.rb', line 18 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.
29 30 31 |
# File 'lib/nanaimo/plist.rb', line 29 def as_ruby root_object.as_ruby end |
#hash ⇒ Object
23 24 25 |
# File 'lib/nanaimo/plist.rb', line 23 def hash root_object.hash end |