Sha256: 17c30d551900673440e23e9be9b0267f6c52d6260f362c3b979cd9af6b8e90f2

Contents?: true

Size: 696 Bytes

Versions: 12

Compression:

Stored size: 696 Bytes

Contents

module NBS

  class ArtistProfile
     METRICS = %w(plays fans views comments downloads likes price)

      attr_accessor :service_type,:url, :artist_id, :options

      def initialize(artist_id,service_type, url="" ,options={})
        self.service_type = service_type 
        self.artist_id = artist_id 
        self.url = url
      end

      def metrics(sdate,edate)
        @metrics ||= load_metrics(sdate,edate)
      end

      def load_metrics(sdate,edate)
        metrics ={}
        METRICS.each do |metric_string|
          metrics[metric_string.to_s] = Metric.new(self.artist_id,self.service_type,metric_string.to_s,sdate,edate)
        end
        return metrics
      end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
next-big-sound-0.4.4 lib/artist_profile.rb
next-big-sound-0.4.3 lib/artist_profile.rb
next-big-sound-0.4.2 lib/artist_profile.rb
next-big-sound-0.4.1 lib/artist_profile.rb
next-big-sound-0.4.0 lib/artist_profile.rb
next-big-sound-0.3.5 lib/artist_profile.rb
next-big-sound-0.3.4 lib/artist_profile.rb
next-big-sound-0.3.3 lib/artist_profile.rb
next-big-sound-0.3.2 lib/artist_profile.rb
next-big-sound-0.3.1 lib/artist_profile.rb
next-big-sound-0.3.0 lib/artist_profile.rb
next-big-sound-0.2.0 lib/artist_profile.rb