File: openstruct_object.rb

package info (click to toggle)
ruby-grape-entity 1.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 456 kB
  • sloc: ruby: 3,335; makefile: 6
file content (13 lines) | stat: -rw-r--r-- 220 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

module Grape
  class Entity
    module Delegator
      class OpenStructObject < Base
        def delegate(attribute)
          object.send attribute
        end
      end
    end
  end
end