module Diet_Dot
Public Instance Methods
dot(name, v = "")
click to toggle source
# File lib/Diet_Dot.rb, line 26 def dot name, v = "" text "[[=data.#{name}]]#{v || ""}" end
dot_array(name) { || ... }
click to toggle source
# File lib/Diet_Dot.rb, line 34 def dot_array name text "[[~data." + name + " :v:i]]" yield text "[[~]]" end
dot_i(str = "i", v = nil)
click to toggle source
# File lib/Diet_Dot.rb, line 4 def dot_i str = "i", v = nil rawdot str, v end
dot_tertiary(a, b, c)
click to toggle source
# File lib/Diet_Dot.rb, line 40 def dot_tertiary a, b, c rawtext "[[? #{a} ]]" rawdot b rawtext "[[??]]" rawdot c rawtext "[[?]]" end
dot_v(str = "v", v = nil)
click to toggle source
# File lib/Diet_Dot.rb, line 8 def dot_v str = "v", v = nil rawdot str, v end
inline_rawdot(str)
click to toggle source
# File lib/Diet_Dot.rb, line 12 def inline_rawdot str return( capture { rawtext(rawdot(str, :inline)) }) end
rawdot(val, v = nil)
click to toggle source
# File lib/Diet_Dot.rb, line 18 def rawdot val, v = nil str = "[[=#{val}]]" if v === :inline return str end text str + (v || "") end
var(*args, &blok)
click to toggle source
# File lib/Diet_Dot.rb, line 30 def var *args, &blok dot(*args, &blok) end