Class: GovukAbTesting::AcceptanceTests::MetaTag

Inherits:
Object
  • Object
show all
Defined in:
lib/govuk_ab_testing/acceptance_tests/meta_tag.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contentObject (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

Returns:

  • (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