Class: TypeStation::Content

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Attributes::Dynamic, Mongoid::Document
Defined in:
app/models/type_station/content.rb

Constant Summary collapse

TYPES =
[:text, :html, :image, :file, :select, :multiple_select]

Instance Method Summary collapse

Instance Method Details

#getObject

INSTANT METHODS



25
26
27
# File 'app/models/type_station/content.rb', line 25

def get
  self[self.type]
end

#set(value) ⇒ Object



29
30
31
# File 'app/models/type_station/content.rb', line 29

def set(value)
  self[self.type] = convert(value)
end