Sha256: f552646680b48faa0d475aa0d9ef544a0cd7300fb3419360eae76b221fde23e8

Contents?: true

Size: 423 Bytes

Versions: 239

Compression:

Stored size: 423 Bytes

Contents

module ActiveScaffold::DataStructures
  # Wrapper for error strings so that they may be exported using to_xxx
  class ErrorMessage
    def initialize(error)
      @error = error
    end

    def public_attributes
      { :error => @error }
    end

    def to_xml
      public_attributes.to_xml(:root => "errors")
    end

    def to_yaml
      public_attributes.to_yaml
    end

    def to_s
      @error
    end
  end
end

Version data entries

239 entries across 239 versions & 9 rubygems

Version Path
active_scaffold-3.2.15 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.2.14 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.2.13 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.2.12 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.2.11 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.2.10 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.2.9 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.2.8 lib/active_scaffold/data_structures/error_message.rb
active_scaffold_vho-3.1.4 lib/active_scaffold/data_structures/error_message.rb
active_scaffold_vho-3.0.26 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.2.7 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.2.6 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.2.5 lib/active_scaffold/data_structures/error_message.rb
six-updater-web-0.24.15 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/error_message.rb
six-updater-web-0.24.14 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/error_message.rb
six-updater-web-0.24.13 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.2.4 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.2.3 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-sequel-0.5.1 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-sequel-0.5.0 lib/active_scaffold/data_structures/error_message.rb