Module: Mail::CommonField

Included in:
StructuredField, UnstructuredField
Defined in:
lib/mail/fields/common/common_field.rb

Overview

:nodoc:

Constant Summary

Instance Method Summary (collapse)

Instance Method Details

- (Object) default



28
29
30
# File 'lib/mail/fields/common/common_field.rb', line 28

def default
  decoded
end

- (Object) field_length



32
33
34
# File 'lib/mail/fields/common/common_field.rb', line 32

def field_length
  @length ||= "#{name}: #{encode(decoded)}".length
end

- (Object) name



9
10
11
# File 'lib/mail/fields/common/common_field.rb', line 9

def name
  @name ||= nil
end

- (Object) name=(value)



5
6
7
# File 'lib/mail/fields/common/common_field.rb', line 5

def name=(value)
  @name = value
end

- (Boolean) responsible_for?(val)

Returns:

  • (Boolean)


36
37
38
# File 'lib/mail/fields/common/common_field.rb', line 36

def responsible_for?( val )
  name.to_s.casecmp(val.to_s) == 0
end

- (Object) to_s



24
25
26
# File 'lib/mail/fields/common/common_field.rb', line 24

def to_s
  decoded.to_s
end

- (Object) value



20
21
22
# File 'lib/mail/fields/common/common_field.rb', line 20

def value
  @value
end

- (Object) value=(value)



13
14
15
16
17
18
# File 'lib/mail/fields/common/common_field.rb', line 13

def value=(value)
  @length = nil
  @tree = nil
  @element = nil
  @value = value
end