Class: Plist::PTag

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

Direct Known Subclasses

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePTag

Returns a new instance of PTag.



158
159
160
# File 'lib/plist/parser.rb', line 158

def initialize
  @children = []
end

Instance Attribute Details

#childrenObject

Returns the value of attribute children.



157
158
159
# File 'lib/plist/parser.rb', line 157

def children
  @children
end

#textObject

Returns the value of attribute text.



157
158
159
# File 'lib/plist/parser.rb', line 157

def text
  @text
end

Class Method Details

.inherited(sub_class) ⇒ Object



149
150
151
152
153
154
155
# File 'lib/plist/parser.rb', line 149

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



145
146
147
# File 'lib/plist/parser.rb', line 145

def self.mappings
  @mappings ||= {}
end

Instance Method Details

#to_rubyObject



162
163
164
# File 'lib/plist/parser.rb', line 162

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