Method: Representable::Config#wrap_for
- Defined in:
- lib/representable/config.rb
#wrap_for(represented, options = {}, &block) ⇒ Object
Computes the wrap string or returns false.
31 32 33 34 35 36 37 38 39 |
# File 'lib/representable/config.rb', line 31 def wrap_for(represented, = {}, &block) return unless @wrap value = @wrap.(exec_context: represented, keyword_arguments: .to_hash) return value if value != true infer_name_for(represented.class.name) end |