Class: FlexmlsApi::Models::Constraint

Inherits:
Object
  • Object
show all
Defined in:
lib/flexmls_api/models/constraint.rb

Constant Summary collapse

ATTRIBUTES =
["RuleValue","Value","RuleFieldValue","RuleField","RuleName"]

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Constraint

Returns a new instance of Constraint.



6
7
8
# File 'lib/flexmls_api/models/constraint.rb', line 6

def initialize(args)
  ATTRIBUTES.each { |f| send("#{f}=", args[f]) if args.include?(f) || args.include?(f.to_sym) }
end

Instance Method Details

#to_sObject



10
11
12
# File 'lib/flexmls_api/models/constraint.rb', line 10

def to_s
  "#{self.RuleName}: Field(#{self.RuleField},#{self.RuleFieldValue}) Value(#{self.RuleValue},#{self.Value})"
end