Class: Fortitude::Doctypes::Base
- Inherits:
-
Object
- Object
- Fortitude::Doctypes::Base
show all
- Extended by:
- Tags::TagStore
- Defined in:
- lib/fortitude/doctypes/base.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
delegate_tag_stores, modify_tag, tag, tag_names, tags_added!, tags_changed!
Constructor Details
#initialize(name, doctype_line) ⇒ Base
Returns a new instance of Base.
20
21
22
23
|
# File 'lib/fortitude/doctypes/base.rb', line 20
def initialize(name, doctype_line)
@name = name
@doctype_line = doctype_line
end
|
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
18
19
20
|
# File 'lib/fortitude/doctypes/base.rb', line 18
def name
@name
end
|
Class Method Details
.delegate_tag_stores ⇒ Object
9
10
11
12
13
14
15
|
# File 'lib/fortitude/doctypes/base.rb', line 9
def delegate_tag_stores
if superclass.respond_to?(:tags)
[ superclass ]
else
[ ]
end
end
|
Instance Method Details
33
34
35
|
# File 'lib/fortitude/doctypes/base.rb', line 33
def close_void_tags_must_be
nil
end
|
#declare!(w) ⇒ Object
29
30
31
|
# File 'lib/fortitude/doctypes/base.rb', line 29
def declare!(w)
w.doctype(@doctype_line)
end
|
25
26
27
|
# File 'lib/fortitude/doctypes/base.rb', line 25
def tags
self.class.tags
end
|
#to_s ⇒ Object
37
38
39
|
# File 'lib/fortitude/doctypes/base.rb', line 37
def to_s
"<Doctype #{name.inspect}>"
end
|