Class: Wrxer::ChildAttribute
Class Method Summary collapse
Methods inherited from Coercion
Class Method Details
.call(document, params = {}) ⇒ Object
51 52 53 54 |
# File 'lib/wrxer/coercion.rb', line 51 def self.call(document, params = {}) child = document.children child.empty? ? nil : self.coerce(child) end |
.coerce(document) ⇒ Object
56 57 58 |
# File 'lib/wrxer/coercion.rb', line 56 def self.coerce(document) document.text end |