Class: Livetext::Functions

Inherits:
Object
  • Object
show all
Defined in:
lib/liveblog.rb,
lib/liveblog.rb

Overview

experimental…

Instance Method Summary collapse

Instance Method Details

#_var(name) ⇒ Object



710
711
712
# File 'lib/liveblog.rb', line 710

def _var(name)
  ::Livetext::Vars[name] || "[:#{name} is undefined]"
end

#br(n = "1") ⇒ Object



683
684
685
686
687
688
# File 'lib/liveblog.rb', line 683

def br(n="1")
  # Thought: Maybe make a way for functions to "simply" call the
  #   dot command of the same name?? Is this trivial??
  n = n.empty? ? 1 : n.to_i
  "<br>"*n
end

#h1(param) ⇒ Object



690
# File 'lib/liveblog.rb', line 690

def h1(param); "<h1>#{param}</h1>"; end

#h2(param) ⇒ Object



691
# File 'lib/liveblog.rb', line 691

def h2(param); "<h2>#{param}</h2>"; end

#h3(param) ⇒ Object



692
# File 'lib/liveblog.rb', line 692

def h3(param); "<h3>#{param}</h3>"; end

#h4(param) ⇒ Object



693
# File 'lib/liveblog.rb', line 693

def h4(param); "<h4>#{param}</h4>"; end

#h5(param) ⇒ Object



694
# File 'lib/liveblog.rb', line 694

def h5(param); "<h5>#{param}</h5>"; end

#h6(param) ⇒ Object



695
# File 'lib/liveblog.rb', line 695

def h6(param); "<h6>#{param}</h6>"; end

#hr(param = nil) ⇒ Object



697
698
699
# File 'lib/liveblog.rb', line 697

def hr(param=nil)
  $Dot.hr
end

#image(param) ⇒ Object



701
702
703
# File 'lib/liveblog.rb', line 701

def image(param)
  "<img src='#{param}'></img>"
end