Class: ArticleFixtureGen::Data::SmtpAttributes

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/article_fixture_gen/data/smtp_attributes.rb

Overview

Wraps attributes for a single marker-tag pair instance. Initially, the only attribute supported is ‘:id_string`.

Instance Method Summary collapse

Constructor Details

#initialize(config:) ⇒ SmtpAttributes

Returns a new instance of SmtpAttributes.



10
11
12
13
14
# File 'lib/article_fixture_gen/data/smtp_attributes.rb', line 10

def initialize(config:)
  text = config.smtp_text
  @items = Array.new(config.smtp_count) { build_item(text) }
  self
end

Instance Method Details

#each(&_block) ⇒ Object



16
17
18
# File 'lib/article_fixture_gen/data/smtp_attributes.rb', line 16

def each(&_block)
  @items.each { |item| yield item }
end