Module: Mail::CommonField
- Included in:
- StructuredField, UnstructuredField
- Defined in:
- lib/mail/fields/common/common_field.rb
Overview
:nodoc:
Instance Method Summary collapse
- #default ⇒ Object
- #field_length ⇒ Object
- #name ⇒ Object
- #name=(value) ⇒ Object
- #responsible_for?(val) ⇒ Boolean
- #to_s ⇒ Object
- #value ⇒ Object
- #value=(value) ⇒ Object
Instance Method Details
#default ⇒ Object
28 29 30 |
# File 'lib/mail/fields/common/common_field.rb', line 28 def default decoded end |
#field_length ⇒ Object
32 33 34 |
# File 'lib/mail/fields/common/common_field.rb', line 32 def field_length @length ||= "#{name}: #{encode(decoded)}".length end |
#name ⇒ Object
9 10 11 |
# File 'lib/mail/fields/common/common_field.rb', line 9 def name @name ||= nil end |
#name=(value) ⇒ Object
5 6 7 |
# File 'lib/mail/fields/common/common_field.rb', line 5 def name=(value) @name = value end |
#responsible_for?(val) ⇒ Boolean
36 37 38 |
# File 'lib/mail/fields/common/common_field.rb', line 36 def responsible_for?( val ) name.to_s.downcase == val.to_s.downcase end |
#to_s ⇒ Object
24 25 26 |
# File 'lib/mail/fields/common/common_field.rb', line 24 def to_s decoded end |
#value ⇒ Object
20 21 22 |
# File 'lib/mail/fields/common/common_field.rb', line 20 def value @value end |
#value=(value) ⇒ Object
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 |