Copyright © 2014 by mTLD Top Level Domain Limited. All rights reserved.
Portions copyright © 2008 by Argo Interactive Limited.
Portions copyright © 2008 by Nokia Inc.
Portions copyright © 2008 by Telecom Italia Mobile S.p.A.
Portions copyright © 2008 by Volantis Systems Limited.
Portions copyright © 2002-2008 by Andreas Staeding.
Portions copyright © 2008 by Zandan.
dotMobi
Constants to make keys more readable
# File ../../device_api/trunk/ruby/src/lib/post_walk_rules.rb, line 38 def initialize tree_provider, type # Initialize two of the public instance variables @tree_provider = tree_provider @branch = tree_provider.tree[type] # main branch # Initialize the private instance variables @prop_matcher_ids_in_use = [] @rule_prop_ids_in_use = [] # loop over all rule groups rg = @branch[KEY_RULE_GROUPS] max_rg = rg.size - 1 for i in 0..max_rg group = rg[i] # We want to keep a list of all the properties that are used because when # a user calls DeviceApi.properties we need to fetch additional properties # other than the property they want to optimize the User-Agent string # rules. init_get_matcher_propery_ids group, @prop_matcher_ids_in_use sets = init_rule_sets group # Also keep a list of all the property IDs that can be output @rule_prop_ids_in_use = init_get_rule_property_ids(sets, @rule_prop_ids_in_use) end end
Find all the properties that are used for matching. This is needed in case the Mobi::Mtld::Da::Device::DeviceApi#properties function is called as we need these properties for the rules to work correctly.
group
The rule group that can contain a property matcher.
prop_ids
The list of found property IDs.
return
An updated set of property IDs.
# File ../../device_api/trunk/ruby/src/lib/post_walk_rules.rb, line 81 def init_get_matcher_propery_ids group, prop_ids raise PostWalkRulesException, "This is an abstract method that has not been implemented." end
Prepare the rule set
group
The current parent group.
return
A list of all rule sets.
# File ../../device_api/trunk/ruby/src/lib/post_walk_rules.rb, line 89 def init_rule_sets(group) raise PostWalkRulesException, "This is an abstract method that has not been implemented." end