Class: DynamicsCRM::Metadata::AttributeQueryExpression
- Inherits:
-
Object
- Object
- DynamicsCRM::Metadata::AttributeQueryExpression
- Defined in:
- lib/dynamics_crm/metadata/attribute_query_expression.rb
Instance Attribute Summary collapse
-
#criteria ⇒ Object
Returns the value of attribute criteria.
-
#properties ⇒ Object
Returns the value of attribute properties.
Instance Method Summary collapse
-
#initialize(criteria, properties) ⇒ AttributeQueryExpression
constructor
A new instance of AttributeQueryExpression.
- #to_xml(options = {}) ⇒ Object
Constructor Details
#initialize(criteria, properties) ⇒ AttributeQueryExpression
Returns a new instance of AttributeQueryExpression.
7 8 9 10 |
# File 'lib/dynamics_crm/metadata/attribute_query_expression.rb', line 7 def initialize(criteria, properties) @criteria = criteria @properties = properties end |
Instance Attribute Details
#criteria ⇒ Object
Returns the value of attribute criteria.
5 6 7 |
# File 'lib/dynamics_crm/metadata/attribute_query_expression.rb', line 5 def criteria @criteria end |
#properties ⇒ Object
Returns the value of attribute properties.
5 6 7 |
# File 'lib/dynamics_crm/metadata/attribute_query_expression.rb', line 5 def properties @properties end |
Instance Method Details
#to_xml(options = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/dynamics_crm/metadata/attribute_query_expression.rb', line 12 def to_xml(={}) namespace = [:namespace] ? [:namespace] : 'b' xml = %Q{<#{namespace}:AttributeQuery>} xml << @criteria.to_xml({namespace: namespace}) if @criteria xml << @properties.to_xml({namespace: namespace}) if @properties xml << %Q{</#{namespace}:AttributeQuery>} return xml end |