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