Sha256: 0dadbfbe16f3dbf74c4d55f47fd5a30ae1f8bb8fdfb8bccc24ff16f7636144ac
Contents?: true
Size: 707 Bytes
Versions: 11
Compression:
Stored size: 707 Bytes
Contents
module GnipApi module Apis module PowerTrack class Rule attr_accessor :value, :tag, :id def initialize params={} @value = params[:value] || params['value'] @tag = params[:tag] || params['tag'] @id = params[:id] || params['id'] end def to_json attributes.to_json end def attributes attrs = {} attrs[:value] = @value if @value attrs[:tag] = @tag if @tag attrs[:id] = @id if @id attrs end def uid rule = @value rule += "tag:#{@tag}" if @tag Digest::SHA2.hexdigest(rule) end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems