Sha256: 0b1c4f95c9de22134ee75a9b4067711a1a437ac01ac9bb00033cfe8e739b3657

Contents?: true

Size: 540 Bytes

Versions: 129

Compression:

Stored size: 540 Bytes

Contents

# encoding: utf-8
module Mail
  class ContentLocationElement # :nodoc:
    
    include Mail::Utilities
    
    def initialize( string )
      parser = Mail::ContentLocationParser.new
      if tree = parser.parse(string)
        @location = tree.location.text_value
      else
        raise Mail::Field::ParseError, "ContentLocationElement can not parse |#{string}|\nReason was: #{parser.failure_reason}\n"
      end
    end
    
    def location
      @location
    end
    
    def to_s(*args)
      location.to_s
    end
    
  end
end

Version data entries

129 entries across 99 versions & 6 rubygems

Version Path
mail-2.2.9.1 lib/mail/elements/content_location_element.rb
dball-mail-2.2.9.2 lib/mail/elements/content_location_element.rb
dball-mail-2.2.9.1 lib/mail/elements/content_location_element.rb
mail-2.2.9 lib/mail/elements/content_location_element.rb
mail-2.2.7 lib/mail/elements/content_location_element.rb
mail-2.2.6.1 lib/mail/elements/content_location_element.rb
mail-2.2.6 lib/mail/elements/content_location_element.rb
mail-2.2.5.2 lib/mail/elements/content_location_element.rb
mail-2.2.5.1 lib/mail/elements/content_location_element.rb
mail-2.2.5 lib/mail/elements/content_location_element.rb
mail-2.2.4 lib/mail/elements/content_location_element.rb
mail-2.2.3 lib/mail/elements/content_location_element.rb
mail-2.2.2 lib/mail/elements/content_location_element.rb
rack-mail_exception-0.0.1 vendor/mail/lib/mail/elements/content_location_element.rb
mail-2.2.1 lib/mail/elements/content_location_element.rb
mail-2.2.0 lib/mail/elements/content_location_element.rb
mail-2.1.5.3 lib/mail/elements/content_location_element.rb
mail-2.1.5.2 lib/mail/elements/content_location_element.rb
mail-2.1.5.1 lib/mail/elements/content_location_element.rb
mail-2.1.5 lib/mail/elements/content_location_element.rb