Class: Attachment

Inherits:
LogicalModel
  • Object
show all
Defined in:
app/models/attachment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



10
11
12
# File 'app/models/attachment.rb', line 10

def description
  @description
end

#fileObject

Returns the value of attribute file.



10
11
12
# File 'app/models/attachment.rb', line 10

def file
  @file
end

#nameObject

Returns the value of attribute name.



10
11
12
# File 'app/models/attachment.rb', line 10

def name
  @name
end

#primaryObject

Returns the value of attribute primary.



10
11
12
# File 'app/models/attachment.rb', line 10

def primary
  @primary
end

#publicObject

Returns the value of attribute public.



10
11
12
# File 'app/models/attachment.rb', line 10

def public
  @public
end

Instance Method Details

#_typeObject



37
38
39
# File 'app/models/attachment.rb', line 37

def _type
  self.class.name
end

#always_public?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'app/models/attachment.rb', line 16

def always_public?
  false
end

#idObject



28
29
30
# File 'app/models/attachment.rb', line 28

def id
  self._id
end

#id=(id) ⇒ Object



32
33
34
# File 'app/models/attachment.rb', line 32

def id= id
  self._id = id
end

#json_rootObject



20
21
22
# File 'app/models/attachment.rb', line 20

def json_root
  :attachment
end

#new_record?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'app/models/attachment.rb', line 12

def new_record?
  self._id.blank?
end

#to_keyObject



24
25
26
# File 'app/models/attachment.rb', line 24

def to_key
  [self._id]
end