class Mail::MimeVersionElement - mail-2.5.4 Documentation

# class Mail::MimeVersionElement

### Public Class Methods

new( string ) click to toggle source

    # File lib/mail/elements/mime_version_element.rb, line 6
    def initialize( string )
      parser = Mail::MimeVersionParser.new
      if tree = parser.parse(string)
        @major = tree.major.text_value
        @minor = tree.minor.text_value
      else
        raise Mail::Field::ParseError.new(MimeVersionElement, string, parser.failure_reason)
      end
    end

### Public Instance Methods

major() click to toggle source

    # File lib/mail/elements/mime_version_element.rb, line 16
    def major
      @major
    end

minor() click to toggle source

    # File lib/mail/elements/mime_version_element.rb, line 20
    def minor
      @minor
    end