Sha256: 349dde14de25bd1ccd23fe2c5273d43c601165dd419f816b6f1ed9b41236925c

Contents?: true

Size: 448 Bytes

Versions: 1

Compression:

Stored size: 448 Bytes

Contents

#
module JSS

  #
  module ManagementHistory

    # This is mixed in to the history event classes to
    # provide hash-like access to their attributes, so that
    #    `some_event[:date_time]`
    # works the same as
    #     `some_event.date_time`
    # just as with OpenStruct objects
    #
    module HashLike

      def [](attr)
        self.send attr.to_sym
      end

    end # HashLike

  end # module ManagementHistory

end # module JSS

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-jss-0.11.0a6 lib/jss/api_object/management_history/hashlike.rb