Class: Pepipost::EmailDetails
- Inherits:
-
Object
- Object
- Pepipost::EmailDetails
- Defined in:
- lib/pepipost/models/email_details.rb
Instance Attribute Summary collapse
-
#content ⇒ String
TODO: Write general description for this method.
-
#from ⇒ String
TODO: Write general description for this method.
-
#fromname ⇒ String
TODO: Write general description for this method.
-
#replytoid ⇒ String
TODO: Write general description for this method.
-
#subject ⇒ String
TODO: Write general description for this method.
-
#tags ⇒ String
TODO: Write general description for this method.
Instance Method Summary collapse
-
#key_map ⇒ Object
Defines the key map for json serialization.
- #method_missing(method_name) ⇒ Object
-
#to_json ⇒ Object
Creates JSON of the curent object.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name) ⇒ Object
27 28 29 |
# File 'lib/pepipost/models/email_details.rb', line 27 def method_missing(method_name) puts "there's no method called '#{method_name}'" end |
Instance Attribute Details
#content ⇒ String
TODO: Write general description for this method
25 26 27 |
# File 'lib/pepipost/models/email_details.rb', line 25 def content @content end |
#from ⇒ String
TODO: Write general description for this method
13 14 15 |
# File 'lib/pepipost/models/email_details.rb', line 13 def from @from end |
#fromname ⇒ String
TODO: Write general description for this method
5 6 7 |
# File 'lib/pepipost/models/email_details.rb', line 5 def fromname @fromname end |
#replytoid ⇒ String
TODO: Write general description for this method
17 18 19 |
# File 'lib/pepipost/models/email_details.rb', line 17 def replytoid @replytoid end |
#subject ⇒ String
TODO: Write general description for this method
9 10 11 |
# File 'lib/pepipost/models/email_details.rb', line 9 def subject @subject end |
#tags ⇒ String
TODO: Write general description for this method
21 22 23 |
# File 'lib/pepipost/models/email_details.rb', line 21 def @tags end |
Instance Method Details
#key_map ⇒ Object
Defines the key map for json serialization
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/pepipost/models/email_details.rb', line 38 def key_map hash = {} hash['fromname'] = fromname hash['subject'] = subject hash['from'] = from hash['replytoid'] = replytoid hash['tags'] = hash['content'] = content hash end |
#to_json ⇒ Object
Creates JSON of the curent object
32 33 34 35 |
# File 'lib/pepipost/models/email_details.rb', line 32 def to_json hash = key_map hash.to_json end |