Sha256: 2c91c6db6950fc6b3787e431b28dc65d97fed56d2355d6feb1013af5b1cab0db

Contents?: true

Size: 737 Bytes

Versions: 1

Compression:

Stored size: 737 Bytes

Contents

module Anubis
  module Output
    ##
    # Output subclass that represents data for edit(new) action
    class Autocomplete < Basic
      # @!attribute [rw]
      # @return [Hash] the hash of defined fields.
      class_attribute :values, default: {}

      ##
      # Initializes menu output data. Generates default values.
      def initialize
        super
        self.values = []
      end

      ##
      # Generates hash representation of output class
      # @return [Hash] hash representation of all data
      def to_h
        result = super.to_h
        return result if self.result != 0
        result.merge!({
                          values: self.values,
                      })
        result
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
anoubis-1.0.0 app/controllers/anoubis/output/autocomplete.rb