Class: DocWrapper::BooleanPropertyDefinition
- Inherits:
-
InnerHtmlPropertyDefinition
- Object
- BasePropertyDefinition
- InnerHtmlPropertyDefinition
- DocWrapper::BooleanPropertyDefinition
- Defined in:
- lib/doc_wrapper/boolean_property_definition.rb
Instance Attribute Summary
Attributes inherited from BasePropertyDefinition
#block, #options, #property_name, #selector, #type
Instance Method Summary collapse
Methods inherited from InnerHtmlPropertyDefinition
#get_nodes, #property, #raw_property
Methods inherited from BasePropertyDefinition
Constructor Details
This class inherits a constructor from DocWrapper::BasePropertyDefinition
Instance Method Details
#transform(result) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/doc_wrapper/boolean_property_definition.rb', line 3 def transform (result) raise "BooleanPropertyDefinition: boolean_test is deprecated please use options[:parser] or a block." if [:boolean_test] if block result = block.call(result) else result = result.blank? ? nil : ([:parser] ? [:parser].call(result) : [:boolean_test].call(result) ) end result end |