Class: Plist::PTag

Inherits:
Object
  • Object
show all
Defined in:
lib/searchlink/plist.rb

Direct Known Subclasses

PArray, PData, PDate, PDict, PFalse, PInteger, PKey, PList, PReal, PString, PTrue

Constant Summary collapse

@@mappings =
{}

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePTag

Returns a new instance of PTag.



108
109
110
# File 'lib/searchlink/plist.rb', line 108

def initialize
  @children = []
end

Instance Attribute Details

#childrenObject

Returns the value of attribute children.



107
108
109
# File 'lib/searchlink/plist.rb', line 107

def children
  @children
end

#textObject

Returns the value of attribute text.



107
108
109
# File 'lib/searchlink/plist.rb', line 107

def text
  @text
end

Class Method Details

.inherited(sub_class) ⇒ Object



99
100
101
102
103
104
105
# File 'lib/searchlink/plist.rb', line 99

def self.inherited(sub_class)
  key = sub_class.to_s.downcase
  key.gsub!(/^plist::/, '')
  key.gsub!(/^p/, '') unless key == 'plist'

  @@mappings[key] = sub_class
end

.mappingsObject



95
96
97
# File 'lib/searchlink/plist.rb', line 95

def self.mappings
  @@mappings
end

Instance Method Details

#to_rubyObject



112
113
114
# File 'lib/searchlink/plist.rb', line 112

def to_ruby
  raise 'Unimplemented: ' + self.class.to_s + "#to_ruby on #{inspect}"
end