Class: Locca::AuditResult
- Inherits:
-
Object
- Object
- Locca::AuditResult
- Defined in:
- lib/locca/audit_result.rb
Instance Attribute Summary collapse
-
#collection_name ⇒ Object
readonly
Returns the value of attribute collection_name.
-
#extra_keys ⇒ Object
Returns the value of attribute extra_keys.
-
#lang ⇒ Object
readonly
Returns the value of attribute lang.
-
#missing_keys ⇒ Object
Returns the value of attribute missing_keys.
-
#untranslated_keys ⇒ Object
readonly
Returns the value of attribute untranslated_keys.
Instance Method Summary collapse
- #add_untranslated_key(value) ⇒ Object
-
#initialize(collection_name, lang) ⇒ AuditResult
constructor
A new instance of AuditResult.
- #passed? ⇒ Boolean
Constructor Details
#initialize(collection_name, lang) ⇒ AuditResult
Returns a new instance of AuditResult.
33 34 35 36 37 38 39 |
# File 'lib/locca/audit_result.rb', line 33 def initialize(collection_name, lang) @collection_name = collection_name @lang = lang @untranslated_keys = [] @missing_keys = [] @extra_keys = [] end |
Instance Attribute Details
#collection_name ⇒ Object (readonly)
Returns the value of attribute collection_name.
27 28 29 |
# File 'lib/locca/audit_result.rb', line 27 def collection_name @collection_name end |
#extra_keys ⇒ Object
Returns the value of attribute extra_keys.
31 32 33 |
# File 'lib/locca/audit_result.rb', line 31 def extra_keys @extra_keys end |
#lang ⇒ Object (readonly)
Returns the value of attribute lang.
28 29 30 |
# File 'lib/locca/audit_result.rb', line 28 def lang @lang end |
#missing_keys ⇒ Object
Returns the value of attribute missing_keys.
30 31 32 |
# File 'lib/locca/audit_result.rb', line 30 def missing_keys @missing_keys end |
#untranslated_keys ⇒ Object (readonly)
Returns the value of attribute untranslated_keys.
29 30 31 |
# File 'lib/locca/audit_result.rb', line 29 def untranslated_keys @untranslated_keys end |
Instance Method Details
#add_untranslated_key(value) ⇒ Object
41 42 43 |
# File 'lib/locca/audit_result.rb', line 41 def add_untranslated_key(value) @untranslated_keys.push(value) end |
#passed? ⇒ Boolean
45 46 47 |
# File 'lib/locca/audit_result.rb', line 45 def passed? return @untranslated_keys.empty? && @missing_keys.empty? && @extra_keys.empty? end |