Class: Pepipost::Settings
- Inherits:
-
Object
- Object
- Pepipost::Settings
- Defined in:
- lib/pepipost/models/settings.rb
Instance Attribute Summary collapse
-
#attachmentid ⇒ String
TODO: Write general description for this method.
-
#bcc ⇒ String
TODO: Write general description for this method.
-
#clicktrack ⇒ Boolean
TODO: Write general description for this method.
-
#footer ⇒ Boolean
TODO: Write general description for this method.
-
#opentrack ⇒ Boolean
TODO: Write general description for this method.
-
#template ⇒ Numeric
TODO: Write general description for this method.
-
#unsubscribe ⇒ Boolean
TODO: Write general description for this method.
Instance Method Summary collapse
-
#initialize ⇒ Settings
constructor
A new instance of Settings.
-
#key_map ⇒ Object
Defines the key map for json serialization.
- #method_missing(method_name) ⇒ Object
-
#to_json ⇒ Object
Creates JSON of the curent object.
Constructor Details
#initialize ⇒ Settings
Returns a new instance of Settings.
31 32 33 34 35 36 |
# File 'lib/pepipost/models/settings.rb', line 31 def initialize @footer = true @clicktrack = true @opentrack = true @unsubscribe = true end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name) ⇒ Object
38 39 40 |
# File 'lib/pepipost/models/settings.rb', line 38 def method_missing(method_name) puts "there's no method called '#{method_name}'" end |
Instance Attribute Details
#attachmentid ⇒ String
TODO: Write general description for this method
25 26 27 |
# File 'lib/pepipost/models/settings.rb', line 25 def @attachmentid end |
#bcc ⇒ String
TODO: Write general description for this method
21 22 23 |
# File 'lib/pepipost/models/settings.rb', line 21 def bcc @bcc end |
#clicktrack ⇒ Boolean
TODO: Write general description for this method
9 10 11 |
# File 'lib/pepipost/models/settings.rb', line 9 def clicktrack @clicktrack end |
#footer ⇒ Boolean
TODO: Write general description for this method
5 6 7 |
# File 'lib/pepipost/models/settings.rb', line 5 def @footer end |
#opentrack ⇒ Boolean
TODO: Write general description for this method
13 14 15 |
# File 'lib/pepipost/models/settings.rb', line 13 def opentrack @opentrack end |
#template ⇒ Numeric
TODO: Write general description for this method
29 30 31 |
# File 'lib/pepipost/models/settings.rb', line 29 def template @template end |
#unsubscribe ⇒ Boolean
TODO: Write general description for this method
17 18 19 |
# File 'lib/pepipost/models/settings.rb', line 17 def unsubscribe @unsubscribe end |
Instance Method Details
#key_map ⇒ Object
Defines the key map for json serialization
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/pepipost/models/settings.rb', line 49 def key_map hash = {} hash['footer'] = hash['clicktrack'] = clicktrack hash['opentrack'] = opentrack hash['unsubscribe'] = unsubscribe hash['bcc'] = bcc hash['attachmentid'] = hash['template'] = template hash end |
#to_json ⇒ Object
Creates JSON of the curent object
43 44 45 46 |
# File 'lib/pepipost/models/settings.rb', line 43 def to_json hash = key_map hash.to_json end |