module Wardrobe::Plugins::Presenter::InstanceMethods
Public Instance Methods
_present(attributes: nil, **args)
click to toggle source
# File lib/wardrobe/plugins/presenter.rb, line 11 def _present(attributes: nil, **args) options = self.class.plugin_store[:presenter][:options].merge(args) result = {} _attribute_store.store.each do |key, atr| if attributes.nil? || (attributes && attributes.key?(key)) result[key] = send(atr.name)._present(attributes: (attributes[key] if attributes), **options) end end result end