Module: Datory::Info::DSL::ClassMethods

Defined in:
lib/datory/info/dsl.rb

Instance Method Summary collapse

Instance Method Details

#infoObject

rubocop:disable Metrics/MethodLength



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/datory/info/dsl.rb', line 11

def info # rubocop:disable Metrics/MethodLength
  Datory::Info::Result.new(
    attributes: collection_of_attributes.to_h do |attribute|
      [
        attribute.from.name,
        {
          from: attribute.from.info,
          to: attribute.to.info
        }
      ]
    end
  )
end