Class: Ddr::Models::AttachedFilesProfile
- Inherits:
-
Object
- Object
- Ddr::Models::AttachedFilesProfile
- Includes:
- ActiveModel::Serializers::JSON
- Defined in:
- lib/ddr/models/attached_files_profile.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(object) ⇒ AttachedFilesProfile
constructor
A new instance of AttachedFilesProfile.
- #read_attribute_for_serialization(key) ⇒ Object
Constructor Details
#initialize(object) ⇒ AttachedFilesProfile
Returns a new instance of AttachedFilesProfile.
7 8 9 |
# File 'lib/ddr/models/attached_files_profile.rb', line 7 def initialize(object) @object = object end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
5 6 7 |
# File 'lib/ddr/models/attached_files_profile.rb', line 5 def object @object end |
Instance Method Details
#attributes ⇒ Object
11 12 13 |
# File 'lib/ddr/models/attached_files_profile.rb', line 11 def attributes files.keys.map { |k| [k, nil] }.to_h end |
#read_attribute_for_serialization(key) ⇒ Object
15 16 17 |
# File 'lib/ddr/models/attached_files_profile.rb', line 15 def read_attribute_for_serialization(key) AttachedFileProfile.new(files[key]) end |