Module: DCI::Data
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/dci/data.rb
Instance Method Summary collapse
Instance Method Details
#as(role) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/dci/data.rb', line 12 def as(role) if block_given? Casting.delegating(self => role) do yield(self) end else cast_as(role) end end |