Sha256: 05e1b9f65feff24693ca9352410aa07184c956da82c09459e48867a818d5d67c

Contents?: true

Size: 580 Bytes

Versions: 11

Compression:

Stored size: 580 Bytes

Contents

module Micronaut

  class Example
  
    attr_reader :behaviour, :description, :options, :example_block
  
    def initialize(behaviour, desc, options, example_block=nil)
      @behaviour, @description, @options, @example_block = behaviour, desc, options, example_block
    end
    
    def metadata
      @metadata ||= behaviour.metadata.dup
      @metadata[:description] = description
      @metadata[:options].update(options)
      @metadata
    end
    
    def inspect
      "#{behaviour.name} - #{description}"
    end
    
    def to_s
      inspect
    end
  
  end
  
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
rsanheim-micronaut-0.1.3.2 lib/micronaut/example.rb
rsanheim-micronaut-0.1.4.1 lib/micronaut/example.rb
spicycode-micronaut-0.1.2 lib/micronaut/example.rb
spicycode-micronaut-0.1.3 lib/micronaut/example.rb
spicycode-micronaut-0.1.4.1 lib/micronaut/example.rb
spicycode-micronaut-0.1.4.2 lib/micronaut/example.rb
spicycode-micronaut-0.1.4.3 lib/micronaut/example.rb
spicycode-micronaut-0.1.4.4 lib/micronaut/example.rb
spicycode-micronaut-0.1.4 lib/micronaut/example.rb
spicycode-micronaut-0.1.5.2 lib/micronaut/example.rb
spicycode-micronaut-0.1.5 lib/micronaut/example.rb