Class: Amanzi::SLD::PropertyFilterBuilder

Inherits:
ElementWrapper show all
Defined in:
lib/amanzi/sld.rb

Instance Attribute Summary

Attributes inherited from ElementWrapper

#element

Instance Method Summary collapse

Methods inherited from ElementWrapper

#method_missing

Methods included from Logger

#puts

Constructor Details

#initialize(filter) ⇒ PropertyFilterBuilder

Returns a new instance of PropertyFilterBuilder.



200
201
202
# File 'lib/amanzi/sld.rb', line 200

def initialize(filter)
  super filter
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Amanzi::SLD::ElementWrapper

Instance Method Details

#[]=(key, value) ⇒ Object



203
204
205
206
207
208
# File 'lib/amanzi/sld.rb', line 203

def []=(key,value)
  element.property_is_equal_to do |f|
    f.property_name << key.to_s
    f.literal << value.to_s
  end
end

#exists?(name) ⇒ Boolean

Returns:

  • (Boolean)


209
210
211
# File 'lib/amanzi/sld.rb', line 209

def exists? name
  element.send(:not).property_is_null.property_name << name
end

#not_exists?(name) ⇒ Boolean

Returns:

  • (Boolean)


212
213
214
# File 'lib/amanzi/sld.rb', line 212

def not_exists? name
  element.property_is_null.property_name << name
end