Sha256: 4898b91ce655aa41ac4b671e51700602c08a8232198d74c3274e876904089848

Contents?: true

Size: 421 Bytes

Versions: 2

Compression:

Stored size: 421 Bytes

Contents

require 'song'
require 'perimeter/repository'
require 'songs/backend'

module Songs
  include Perimeter::Repository

  def self.my_favorite_song
    record = Songs::Backend.new title: "I'm singing in the rain", length: '2:00'
    record_to_entity record
  end

  after_conversion :add_song_time_to_title

  def self.add_song_time_to_title(entity, record)
    entity.title = "#{entity.title} (#{record.length})"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
perimeter-0.0.7 spec/support/models/songs.rb
perimeter-0.0.3 spec/support/models/songs.rb