Class: PodIdent::RuleParser

Inherits:
Object
  • Object
show all
Defined in:
lib/pod_ident/rule_parser.rb

Constant Summary collapse

RULES_YAML =
File.expand_path('../detection_rules.yml', __dir__)
RULES_BOTS_YAML =
File.expand_path('../detection_rules_bots.yml', __dir__)
RULES_RUBY =
File.expand_path('detection_rules.rb', __dir__)
RULES_BOTS_RUBY =
File.expand_path('detection_rules_bots.rb', __dir__)
RULES_SPEC_RUBY =
File.expand_path('../../spec/detection_rules.rb', __dir__)
RULES_SPEC_BOTS_RUBY =
File.expand_path('../../spec/detection_rules_bots.rb', __dir__)
DO_NOT_EDIT_TEXT =
"# DO NOT EDIT THIS FILE - it gets automatically generated by running \\\"bin/parse-rules\\\"\\n\n"

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bots_rulesObject

Returns the value of attribute bots_rules.



18
19
20
# File 'lib/pod_ident/rule_parser.rb', line 18

def bots_rules
  @bots_rules
end

#rulesObject

Returns the value of attribute rules.



18
19
20
# File 'lib/pod_ident/rule_parser.rb', line 18

def rules
  @rules
end

Instance Method Details

#callObject



20
21
22
23
24
# File 'lib/pod_ident/rule_parser.rb', line 20

def call
  parse_yaml
  write_rules_rb
  write_rules_spec_rb
end