Sha256: 59e26762dfadb6af324b16a0a3afa1a303ff3c6b251f1709e94573fd1e5f088f

Contents?: true

Size: 346 Bytes

Versions: 3

Compression:

Stored size: 346 Bytes

Contents

require "spot/base"

module Spot
  class Album < Spot::Base
    def valid?
      available?(@territory) or !@territory
    end
    
    def artist
      @_artist ||= Spot::Artist.new(@artists.first)
    end
    
    protected
      def territories
        @availability["territories"].split(" ")
      end
    alias_method :to_s, :name
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spot-2.0.4 lib/spot/album.rb
spot-2.0.1 lib/spot/album.rb
spot-2.0.0 lib/spot/album.rb