Module: Ribbon::Intercom::Packageable::Mixin

Included in:
Ribbon::Intercom::Packageable
Defined in:
lib/ribbon/intercom/packageable/mixin.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



7
8
9
# File 'lib/ribbon/intercom/packageable/mixin.rb', line 7

def included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#package_dataObject

Returns the package data for the instance as a hash.



24
25
26
# File 'lib/ribbon/intercom/packageable/mixin.rb', line 24

def package_data
  self.class._package_with_methods.map { |meth| [meth, public_send(meth)] }.to_h
end