Class: Konjak::Header
- Inherits:
-
StructuralElement
- Object
- Delegator
- Element
- StructuralElement
- Konjak::Header
- Defined in:
- lib/konjak/header.rb
Constant Summary collapse
- TAG_NAME =
'header'
Instance Method Summary collapse
-
#can_contain?(element) ⇒ Boolean
methods.
-
#notes ⇒ Object
childrens.
- #properties ⇒ Object
- #user_defined_encodings ⇒ Object
Methods inherited from Element
Constructor Details
This class inherits a constructor from Konjak::Element
Instance Method Details
#can_contain?(element) ⇒ Boolean
methods
35 36 37 |
# File 'lib/konjak/header.rb', line 35 def can_contain?(element) [Note, UserDefinedEncoding, Property].any? {|c| c === element } end |
#notes ⇒ Object
childrens
22 23 24 |
# File 'lib/konjak/header.rb', line 22 def notes children.select {|c| c.name == Note::TAG_NAME }.map! {|n| Note.new(n) } end |
#properties ⇒ Object
30 31 32 |
# File 'lib/konjak/header.rb', line 30 def properties children.select {|c| c.name == Property::TAG_NAME }.map! {|n| Property.new(n) } end |
#user_defined_encodings ⇒ Object
26 27 28 |
# File 'lib/konjak/header.rb', line 26 def user_defined_encodings children.select {|c| c.name == UserDefinedEncoding::TAG_NAME }.map! {|n| UserDefinedEncoding.new(n) } end |