class XanMarkup::Tag
Constants
- CleanArgValue
- QuotedFragment
- QuotedString
- TagArgs
Public Class Methods
new(tag)
click to toggle source
# File lib/xan_markup/tag.rb, line 8 def initialize(tag) @tag = tag end
Public Instance Methods
args()
click to toggle source
# File lib/xan_markup/tag.rb, line 16 def args {}.tap { |args| @tag.scan(TagArgs) { |key, value| args[key.to_sym] = value.gsub(CleanArgValue, "") } } end
args?()
click to toggle source
# File lib/xan_markup/tag.rb, line 20 def args? args.size > 0 end
method()
click to toggle source
# File lib/xan_markup/tag.rb, line 24 def method "markup_#{name}" end
name()
click to toggle source
# File lib/xan_markup/tag.rb, line 12 def name @tag.split.first end