class FormStalker::Data::CheckLogic
Public Class Methods
new(attributes)
click to toggle source
Calls superclass method
FormStalker::Data::Base::new
# File lib/form_stalker/data/check_logic.rb, line 8 def initialize(attributes) if attributes.is_a? String attributes = Helpers.json_to_hash "{#{js_to_json(attributes)}}" end super attributes end
Public Instance Methods
parse_checks(checks)
click to toggle source
# File lib/form_stalker/data/check_logic.rb, line 20 def parse_checks(checks) checks.map { |check| CheckLogic.new(check).attributes } end
parse_fields(fields)
click to toggle source
# File lib/form_stalker/data/check_logic.rb, line 16 def parse_fields(fields) fields.map(&:to_i) end