Module: CanCamel::FilterHelper
- Included in:
- Filters
- Defined in:
- lib/can_camel/filter_helper.rb
Instance Method Summary collapse
Instance Method Details
#from_array(str) ⇒ Object
10 11 12 13 |
# File 'lib/can_camel/filter_helper.rb', line 10 def from_array(str) raise Filters::ArgSyntaxError unless /\A\[(?<els>.+)\]\z/ =~ str els.split ',' end |
#from_int_array(str) ⇒ Object
4 5 6 7 8 |
# File 'lib/can_camel/filter_helper.rb', line 4 def from_int_array(str) from_array(str).map(&:to_i) rescue raise Filters::ArgSyntaxError end |