Module: FileSystem::Model::PartTypeExtensions

Defined in:
lib/file_system/model/part_type_extensions.rb

Instance Method Summary collapse

Instance Method Details

#contentObject



9
10
11
12
13
14
# File 'lib/file_system/model/part_type_extensions.rb', line 9

def content
  attrs = self.attributes.dup
  attrs.delete('id')
  attrs.delete('name')
  attrs.to_yaml
end

#content=(yaml_text) ⇒ Object



16
17
18
# File 'lib/file_system/model/part_type_extensions.rb', line 16

def content=(yaml_text)
  self.attributes = YAML.load(yaml_text)
end

#content_typeObject



2
3
4
# File 'lib/file_system/model/part_type_extensions.rb', line 2

def content_type
  "text/x-yaml"
end

#content_type=(value) ⇒ Object



6
7
# File 'lib/file_system/model/part_type_extensions.rb', line 6

def content_type=(value)
end