Method: Confiner::Example#initialize

Defined in:
lib/confiner/example.rb

#initialize(**attributes) {|_self| ... } ⇒ Example

Returns a new instance of Example.

Yields:

  • (_self)

Yield Parameters:



8
9
10
11
12
13
14
15
16
# File 'lib/confiner/example.rb', line 8

def initialize(**attributes)
  @status = attributes.fetch('status') { attributes.fetch(:status) }
  @name = attributes.fetch('name') { attributes.fetch(:name) }
  @classname = attributes.fetch('classname') { attributes.fetch(:classname) }
  @file = attributes.fetch('file') { attributes.fetch(:file) }
  @occurrence = attributes.fetch('occurrence') { attributes.fetch(:occurrence) }

  yield(self) if block_given?
end