Method: GnipApi::Apis::PowerTrack::Rules#construct_rules
- Defined in:
- lib/gnip_api/apis/power_track/rules.rb
permalink #construct_rules(rules) ⇒ Object
Parses an array of GnipApi::Apis::PowerTrack::Rule objects to the necesary JSON format for the endpoint
45 46 47 48 49 50 51 |
# File 'lib/gnip_api/apis/power_track/rules.rb', line 45 def construct_rules rules parsed_rules = {:rules => []} rules.each do |rule| parsed_rules[:rules] << rule.attributes end parsed_rules.to_json end |