Module: IsoExampleMethods

Defined in:
lib/iso_example_methods.rb

Instance Method Summary collapse

Instance Method Details

#descriptionObject



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/iso_example_methods.rb', line 3

def description
  if @options.key?(:iso_id)
    ## if the description is empty... we don't do anything
    ## I guess it can be empty if an it is defined like so:
    ## it { should have(5).items } - what then?
    unless [:description].to_s.empty? || [:description].include?(@options[:iso_id])
      [:description] = "#{[:description]}, iso: #{@options[:iso_id]}"
    end
  end
  super
end