Class: Liquidice::Transformer::Nodes::HtmlTag
- Inherits:
-
Base
- Object
- Base
- Liquidice::Transformer::Nodes::HtmlTag
show all
- Defined in:
- lib/liquidice/transformer/nodes/html_tag.rb
Constant Summary
collapse
- TAG_TYPES =
[
OPENING_TYPE = :opening,
CLOSING_TYPE = :closing,
EMPTY_TYPE = :empty
].freeze
Instance Attribute Summary
Attributes inherited from Base
#children, #options, #original_text
Instance Method Summary
collapse
Methods inherited from Base
#can_be_merged?, #dot_id, #initialize, #strict_mode?, #transform!, #write_dot, #write_dot_file
Instance Method Details
#closing? ⇒ Boolean
15
16
17
|
# File 'lib/liquidice/transformer/nodes/html_tag.rb', line 15
def closing?
type == CLOSING_TYPE
end
|
#empty? ⇒ Boolean
19
20
21
|
# File 'lib/liquidice/transformer/nodes/html_tag.rb', line 19
def empty?
type == EMPTY_TYPE
end
|
#opening? ⇒ Boolean
11
12
13
|
# File 'lib/liquidice/transformer/nodes/html_tag.rb', line 11
def opening?
type == OPENING_TYPE
end
|
#text_value ⇒ Object
32
33
34
|
# File 'lib/liquidice/transformer/nodes/html_tag.rb', line 32
def text_value
@original_text
end
|
#to_s ⇒ Object
36
37
38
|
# File 'lib/liquidice/transformer/nodes/html_tag.rb', line 36
def to_s
@original_text
end
|
#type ⇒ Object
23
24
25
|
# File 'lib/liquidice/transformer/nodes/html_tag.rb', line 23
def type
@type ||= options[:type]
end
|