Sha256: 7a96e86350016d376372e68e0f7b4c6038a7397e7ec4a20b2a20395676a6e431

Contents?: true

Size: 471 Bytes

Versions: 73

Compression:

Stored size: 471 Bytes

Contents

module SparkApi
  module Models
    class Constraint
      ATTRIBUTES = ["RuleValue","Value","RuleFieldValue","RuleField","RuleName"]
      attr_accessor *ATTRIBUTES
      def initialize(args)
        ATTRIBUTES.each { |f| send("#{f}=", args[f]) if args.include?(f) || args.include?(f.to_sym) }
      end
      
      def to_s
        "#{self.RuleName}: Field(#{self.RuleField},#{self.RuleFieldValue}) Value(#{self.RuleValue},#{self.Value})"
      end
    end
  end
end

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
spark_api-1.4.2 lib/spark_api/models/constraint.rb
spark_api-1.4.1 lib/spark_api/models/constraint.rb
spark_api-1.4.0 lib/spark_api/models/constraint.rb
spark_api-1.3.28 lib/spark_api/models/constraint.rb
spark_api-1.3.27 lib/spark_api/models/constraint.rb
spark_api-1.3.26 lib/spark_api/models/constraint.rb
spark_api-1.3.25 lib/spark_api/models/constraint.rb
spark_api-1.3.24 lib/spark_api/models/constraint.rb
spark_api-1.3.23 lib/spark_api/models/constraint.rb
spark_api-1.3.21 lib/spark_api/models/constraint.rb
spark_api-1.3.20 lib/spark_api/models/constraint.rb
spark_api-1.3.19 lib/spark_api/models/constraint.rb
spark_api-1.3.18 lib/spark_api/models/constraint.rb
spark_api-1.3.17 lib/spark_api/models/constraint.rb
spark_api-1.3.16 lib/spark_api/models/constraint.rb
spark_api-1.3.15 lib/spark_api/models/constraint.rb
spark_api-1.3.14 lib/spark_api/models/constraint.rb
spark_api-1.3.13 lib/spark_api/models/constraint.rb
spark_api-1.3.10 lib/spark_api/models/constraint.rb
spark_api-1.3.9 lib/spark_api/models/constraint.rb