Class: Travis::Lint::DSL::Validator
- Inherits:
-
Struct
- Object
- Struct
- Travis::Lint::DSL::Validator
- Defined in:
- lib/travis/lint/validator.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#language ⇒ Object
Returns the value of attribute language.
-
#message ⇒ Object
Returns the value of attribute message.
-
#validator ⇒ Object
Returns the value of attribute validator.
Instance Method Summary collapse
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key
4 5 6 |
# File 'lib/travis/lint/validator.rb', line 4 def key @key end |
#language ⇒ Object
Returns the value of attribute language
4 5 6 |
# File 'lib/travis/lint/validator.rb', line 4 def language @language end |
#message ⇒ Object
Returns the value of attribute message
4 5 6 |
# File 'lib/travis/lint/validator.rb', line 4 def @message end |
#validator ⇒ Object
Returns the value of attribute validator
4 5 6 |
# File 'lib/travis/lint/validator.rb', line 4 def validator @validator end |
Instance Method Details
#call(hash) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/travis/lint/validator.rb', line 5 def call(hash) if self.validator.call(hash) [false, { :key => self.key, :issue => self. }] else [true, {}] end end |