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
27 28 29 |
# File 'lib/mail/fields/common/common_field.rb', line 27 def default decoded end |
#field_length ⇒ Object
31 32 33 |
# File 'lib/mail/fields/common/common_field.rb', line 31 def field_length @length ||= "#{name}: #{encode(decoded)}".length end |
#name ⇒ Object
8 9 10 |
# File 'lib/mail/fields/common/common_field.rb', line 8 def name @name end |
#name=(value) ⇒ Object
4 5 6 |
# File 'lib/mail/fields/common/common_field.rb', line 4 def name=(value) @name = value end |
#responsible_for?(val) ⇒ Boolean
35 36 37 |
# File 'lib/mail/fields/common/common_field.rb', line 35 def responsible_for?( val ) name.to_s.downcase == val.to_s.downcase end |
#to_s ⇒ Object
23 24 25 |
# File 'lib/mail/fields/common/common_field.rb', line 23 def to_s decoded end |
#value ⇒ Object
19 20 21 |
# File 'lib/mail/fields/common/common_field.rb', line 19 def value @value end |
#value=(value) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/mail/fields/common/common_field.rb', line 12 def value=(value) @length = nil @tree = nil @element = nil @value = value end |