class LLT::Token::XmlTag

Public Instance Methods

inspect() click to toggle source
# File lib/llt/token/xml_tag.rb, line 13
def inspect
  "#{'XML tag'.blue} #{tag_status}: #{to_s}"
end
set_functions() click to toggle source
# File lib/llt/token/xml_tag.rb, line 4
def set_functions
  [:xml_tag]
end
to_xml(*args) click to toggle source

overrides to_xml from Containable - the tag stays as it is

# File lib/llt/token/xml_tag.rb, line 9
def to_xml(*args)
  to_s
end

Private Instance Methods

tag_status() click to toggle source
# File lib/llt/token/xml_tag.rb, line 19
def tag_status
  to_s.match(/\//) ? 'close' : 'open'
end