Class: Pepipost::Files
- Inherits:
-
Object
- Object
- Pepipost::Files
- Defined in:
- lib/pepipost/models/files.rb
Instance Attribute Summary collapse
-
#example_attachment_1_txt ⇒ 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
7 8 9 |
# File 'lib/pepipost/models/files.rb', line 7 def method_missing(method_name) puts "there's no method called '#{method_name}'" end |
Instance Attribute Details
#example_attachment_1_txt ⇒ String
TODO: Write general description for this method
5 6 7 |
# File 'lib/pepipost/models/files.rb', line 5 def @example_attachment_1_txt end |
Instance Method Details
#key_map ⇒ Object
Defines the key map for json serialization
18 19 20 21 22 |
# File 'lib/pepipost/models/files.rb', line 18 def key_map hash = {} hash['example_attachment1.txt'] = hash end |
#to_json ⇒ Object
Creates JSON of the curent object
12 13 14 15 |
# File 'lib/pepipost/models/files.rb', line 12 def to_json hash = key_map hash.to_json end |