Sha256: 65a1c0c89d22b802972242cbe6402f977ee4eed8525009365b2e2055d5244960

Contents?: true

Size: 313 Bytes

Versions: 32

Compression:

Stored size: 313 Bytes

Contents

module Sportradar
  module Api
    class Data

      # Attributes that have a value
      def attributes
        all_attributes.select {|x| !self.send(x).nil? }
      end

      def all_attributes
        self.instance_variables.map{|attribute| attribute.to_s.gsub('@', '').to_sym }
      end

    end

  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
sportradar-api-0.1.17 lib/sportradar/api/data.rb
sportradar-api-0.1.16 lib/sportradar/api/data.rb
sportradar-api-0.1.15 lib/sportradar/api/data.rb
sportradar-api-0.1.14 lib/sportradar/api/data.rb
sportradar-api-0.1.13 lib/sportradar/api/data.rb
sportradar-api-0.1.12 lib/sportradar/api/data.rb
sportradar-api-0.1.11 lib/sportradar/api/data.rb
sportradar-api-0.1.10 lib/sportradar/api/data.rb
sportradar-api-0.1.8 lib/sportradar/api/data.rb
sportradar-api-0.1.7 lib/sportradar/api/data.rb
sportradar-api-0.1.6 lib/sportradar/api/data.rb
sportradar-api-0.1.5 lib/sportradar/api/data.rb