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.
Instance Method Summary collapse
- #for_ab_test?(ab_test_name) ⇒ Boolean
-
#initialize(content:) ⇒ MetaTag
constructor
A new instance of MetaTag.
Constructor Details
#initialize(content:) ⇒ MetaTag
Returns a new instance of MetaTag.
6 7 8 |
# File 'lib/govuk_ab_testing/acceptance_tests/meta_tag.rb', line 6 def initialize(content:) @content = content 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 |
Instance Method Details
#for_ab_test?(ab_test_name) ⇒ Boolean
10 11 12 |
# File 'lib/govuk_ab_testing/acceptance_tests/meta_tag.rb', line 10 def for_ab_test?(ab_test_name) content.match(/#{ab_test_name}/i) end |