Class: GovukAbTesting::AcceptanceTests::MetaTag
- Inherits:
-
Object
- Object
- GovukAbTesting::AcceptanceTests::MetaTag
- Defined in:
- lib/govuk_ab_testing/acceptance_tests/meta_tag.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#dimension ⇒ Object
readonly
Returns the value of attribute dimension.
Instance Method Summary collapse
- #for_ab_test?(ab_test_name) ⇒ Boolean
-
#initialize(content:, dimension:) ⇒ MetaTag
constructor
A new instance of MetaTag.
Constructor Details
#initialize(content:, dimension:) ⇒ MetaTag
Returns a new instance of MetaTag.
6 7 8 9 |
# File 'lib/govuk_ab_testing/acceptance_tests/meta_tag.rb', line 6 def initialize(content:, dimension:) @content = content @dimension = dimension end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
4 5 6 |
# File 'lib/govuk_ab_testing/acceptance_tests/meta_tag.rb', line 4 def content @content end |
#dimension ⇒ Object (readonly)
Returns the value of attribute dimension.
4 5 6 |
# File 'lib/govuk_ab_testing/acceptance_tests/meta_tag.rb', line 4 def dimension @dimension end |
Instance Method Details
#for_ab_test?(ab_test_name) ⇒ Boolean
11 12 13 |
# File 'lib/govuk_ab_testing/acceptance_tests/meta_tag.rb', line 11 def for_ab_test?(ab_test_name) content.match(/#{ab_test_name}/i) end |