Class: Plist::PTag
- Inherits:
-
Object
- Object
- Plist::PTag
- Defined in:
- lib/plist/parser.rb
Direct Known Subclasses
PArray, PData, PDate, PDict, PFalse, PInteger, PKey, PList, PReal, PString, PTrue
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#text ⇒ Object
Returns the value of attribute text.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ PTag
constructor
A new instance of PTag.
- #to_ruby ⇒ Object
Constructor Details
#initialize ⇒ PTag
Returns a new instance of PTag.
147 148 149 |
# File 'lib/plist/parser.rb', line 147 def initialize @children = [] end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
146 147 148 |
# File 'lib/plist/parser.rb', line 146 def children @children end |
#text ⇒ Object
Returns the value of attribute text.
146 147 148 |
# File 'lib/plist/parser.rb', line 146 def text @text end |
Class Method Details
.inherited(sub_class) ⇒ Object
138 139 140 141 142 143 144 |
# File 'lib/plist/parser.rb', line 138 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 |
.mappings ⇒ Object
134 135 136 |
# File 'lib/plist/parser.rb', line 134 def self.mappings @mappings ||= {} end |
Instance Method Details
#to_ruby ⇒ Object
151 152 153 |
# File 'lib/plist/parser.rb', line 151 def to_ruby raise "Unimplemented: " + self.class.to_s + "#to_ruby on #{self.inspect}" end |