Sha256: 62b45e7c99bc68a249b701899e6f31aa0830a8a0b6719b051fc0988283472007

Contents?: true

Size: 473 Bytes

Versions: 6

Compression:

Stored size: 473 Bytes

Contents

module FlexmlsApi
  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

6 entries across 6 versions & 2 rubygems

Version Path
spark_api-1.0.2 lib/spark_api/models/constraint.rb~
spark_api-1.0.1 lib/spark_api/models/constraint.rb~
spark_api-1.0.0 lib/spark_api/models/constraint.rb~
flexmls_api-0.7.3 lib/flexmls_api/models/constraint.rb
flexmls_api-0.7.5 lib/flexmls_api/models/constraint.rb
flexmls_api-0.7.0 lib/flexmls_api/models/constraint.rb