Module: Bwkfanboy::BH
Overview
Helpers for plugin authors.
Instance Method Summary collapse
-
#all_set?(t) ⇒ Boolean
See test_plugin.rb.
-
#clean(t) ⇒ Object
FIXME: clean unsafe html for ‘html’ content_type.
-
#date(t) ⇒ Object
Tries to parse s string as a date.
Instance Method Details
#all_set?(t) ⇒ Boolean
See test_plugin.rb
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/bwkfanboy/plugin.rb', line 25 def all_set? t return false unless t if t.is_a?(Array) return false if t.size == 0 t.each {|i| return false unless i return false if i.to_s.strip.size == 0 } end return false if t.to_s.strip.size == 0 true end |
#clean(t) ⇒ Object
FIXME: clean unsafe html for ‘html’ content_type
11 12 13 14 |
# File 'lib/bwkfanboy/plugin.rb', line 11 def clean t return '' unless t t end |