class Doublesing::Builtins::Header
Public Class Methods
new(a)
click to toggle source
# File lib/doublesing/builtins/header.rb, line 4 def initialize(a) @level = a[0].to_i @body = a[1].to_s end
Public Instance Methods
to_s()
click to toggle source
# File lib/doublesing/builtins/header.rb, line 8 def to_s if @level && @level > 0 "<h#{@level}>#{@body}</h#{@level}>" else "<h1>#{@body}</h1>" end end