Class: Dina::ManagedAttribute

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/dina/models/managed_attribute.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

custom_headers, find_by_group, #initialize, properties, site

Constructor Details

This class inherits a constructor from Dina::BaseModel

Instance Attribute Details

#accepted_componentsObject

Returns the value of attribute accepted_components.



20
21
22
# File 'lib/dina/models/managed_attribute.rb', line 20

def accepted_components
  @accepted_components
end

#accepted_typesObject

Returns the value of attribute accepted_types.



20
21
22
# File 'lib/dina/models/managed_attribute.rb', line 20

def accepted_types
  @accepted_types
end

Class Method Details

.accepted_componentsObject



30
31
32
33
34
35
36
37
# File 'lib/dina/models/managed_attribute.rb', line 30

def self.accepted_components
  [
    "COLLECTING_EVENT",
    "MATERIAL_SAMPLE",
    "DETERMINATION",
    "ASSEMBLAGE"
  ]
end

.accepted_typesObject



39
40
41
42
43
44
45
46
47
# File 'lib/dina/models/managed_attribute.rb', line 39

def self.accepted_types
  [
    "INTEGER",
    "STRING",
    "PICKLIST",
    "DATE",
    "BOOL"
  ]
end

.endpoint_pathObject



22
23
24
# File 'lib/dina/models/managed_attribute.rb', line 22

def self.endpoint_path
  "collection-api/"
end

.table_nameObject



26
27
28
# File 'lib/dina/models/managed_attribute.rb', line 26

def self.table_name
  "managed-attribute"
end

Instance Method Details

#english_descriptionObject



53
54
55
# File 'lib/dina/models/managed_attribute.rb', line 53

def english_description
  description[:en]
end

#english_description=(desc) ⇒ Object



49
50
51
# File 'lib/dina/models/managed_attribute.rb', line 49

def english_description=(desc)
  description[:en] = desc
end

#french_descriptionObject



61
62
63
# File 'lib/dina/models/managed_attribute.rb', line 61

def french_description
  description[:fr]
end

#french_description=(desc) ⇒ Object



57
58
59
# File 'lib/dina/models/managed_attribute.rb', line 57

def french_description=(desc)
  description[:fr] = desc
end