Top Level Namespace
Defined Under Namespace
Modules: Bro, Kernel
Classes: ColoredText, FakeColor, VanillaText
Constant Summary
collapse
- URL =
ENV["BROPAGES_URL"] || 'http://bropages.org'
- FILE =
ENV["HOME"] + '/.bro'
Instance Method Summary
collapse
Instance Method Details
#contains_query(str, query) ⇒ Object
325
326
327
|
# File 'lib/bro.rb', line 325
def contains_query(str, query)
return str.index query
end
|
#line_cmd(str, highlight, prefix = false) ⇒ Object
341
342
343
344
345
346
|
# File 'lib/bro.rb', line 341
def line_cmd(str, highlight, prefix=false)
if prefix
str = "$ #{str}"
end
return "\t#{str}".gsub highlight, highlight.important
end
|
337
338
339
|
# File 'lib/bro.rb', line 337
def (str)
return "\t# #{str.sub('#', '')}".colored.green
end
|
348
349
350
|
# File 'lib/bro.rb', line 348
def (str, i)
return str.upcase.colored.yellow.sub /#\s?/, "#{i}. "
end
|
#starts_with_dollar(str) ⇒ Object
329
330
331
|
# File 'lib/bro.rb', line 329
def starts_with_dollar(str)
return /^\s?$/.match(str)
end
|
#starts_with_hashtag(str) ⇒ Object
333
334
335
|
# File 'lib/bro.rb', line 333
def starts_with_hashtag(str)
return /^\s?#/.match(str)
end
|