Method: GnipApi::Apis::PowerTrack::Rules#parse_rules

Defined in:
lib/gnip_api/apis/power_track/rules.rb

#parse_rules(data) ⇒ Object


56
57
58
59
# File 'lib/gnip_api/apis/power_track/rules.rb', line 56

def parse_rules data
  parsed_data = GnipApi::JsonParser.new.parse(data)
  parsed_data['rules'].map{|rule| GnipApi::Apis::PowerTrack::Rule.new(:value => rule['value'], :tag => rule['tag'], :id => rule['id'])}
end