Class: YamlBot::ValidationBot
- Inherits:
-
Object
- Object
- YamlBot::ValidationBot
- Defined in:
- lib/yaml_bot/validation_bot.rb
Instance Attribute Summary collapse
-
#rules ⇒ Object
Returns the value of attribute rules.
-
#violations ⇒ Object
Returns the value of attribute violations.
-
#yaml_file ⇒ Object
Returns the value of attribute yaml_file.
Instance Method Summary collapse
-
#initialize(rules = nil, yaml_file = nil) ⇒ ValidationBot
constructor
A new instance of ValidationBot.
- #scan ⇒ Object
Constructor Details
#initialize(rules = nil, yaml_file = nil) ⇒ ValidationBot
Returns a new instance of ValidationBot.
8 9 10 11 12 |
# File 'lib/yaml_bot/validation_bot.rb', line 8 def initialize(rules = nil, yaml_file = nil) @rules = rules || {} @yaml_file = yaml_file || {} @violations = 0 end |
Instance Attribute Details
#rules ⇒ Object
Returns the value of attribute rules.
6 7 8 |
# File 'lib/yaml_bot/validation_bot.rb', line 6 def rules @rules end |
#violations ⇒ Object
Returns the value of attribute violations.
6 7 8 |
# File 'lib/yaml_bot/validation_bot.rb', line 6 def violations @violations end |
#yaml_file ⇒ Object
Returns the value of attribute yaml_file.
6 7 8 |
# File 'lib/yaml_bot/validation_bot.rb', line 6 def yaml_file @yaml_file end |