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_vho-4.0.0 lib/active_scaffold/data_structures/error_message.rb
active_scaffold_vho-3.2.14 lib/active_scaffold/data_structures/error_message.rb
active_scaffold_vho-3.2.13 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-sequel-0.8.0 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.4.17 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.4.16 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.4.14 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.4.13 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.4.12 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-sequel-0.7.1 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.4.11 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.4.10 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.4.9 lib/active_scaffold/data_structures/error_message.rb
active_scaffold_vho-3.2.12 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.4.8 lib/active_scaffold/data_structures/error_message.rb
active_scaffold_vho-3.2.11 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.4.7 lib/active_scaffold/data_structures/error_message.rb
active_scaffold_vho-3.2.10 lib/active_scaffold/data_structures/error_message.rb
active_scaffold_vho-3.2.9 lib/active_scaffold/data_structures/error_message.rb
active_scaffold-3.4.5 lib/active_scaffold/data_structures/error_message.rb