Sha256: cd8b6bfa160b44b168a2285596de65548e213ef7303734ec56bdd3f7ca64ce23

Contents?: true

Size: 412 Bytes

Versions: 2

Compression:

Stored size: 412 Bytes

Contents

class EndecaOnDemand
  class BusinessRuleProperty
    
    def initialize(property)
      property.each do |key, value|
        self.instance_variable_set(:"@#{key.downcase}", value)
        self.class_eval("attr_reader :#{key.downcase}")
      end
    end
    
    def method_missing(method, *args, &block)
      unless self.instance_variables.include?(:"@#{method}")
        "N/A"
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
endeca_on_demand-0.9.7 lib/endeca_on_demand/business_rule_property.rb
endeca_on_demand-0.9.6 lib/endeca_on_demand/business_rule_property.rb