Module: ActiveCopy::Attributes::ClassMethods

Defined in:
lib/active_copy/attributes.rb

Instance Method Summary collapse

Instance Method Details

#accessible_attrsObject



32
33
34
35
# File 'lib/active_copy/attributes.rb', line 32

def accessible_attrs
  return DEFAULT_ATTRS if self._accessible_attributes.nil?
  self._accessible_attributes += DEFAULT_ATTRS
end

#attr_accessible(*args) ⇒ Object



18
19
20
21
22
23
24
25
26
# File 'lib/active_copy/attributes.rb', line 18

def attr_accessible(*args)
  if self._accessible_attributes.nil?
    self._accessible_attributes = []
  end

  args.each do |attribute|
    self._accessible_attributes << attribute
  end
end

#deploy_to(file_path) ⇒ Object



28
29
30
# File 'lib/active_copy/attributes.rb', line 28

def deploy_to file_path
  self._deployment_path = file_path
end

#deployment_pathObject



37
38
39
# File 'lib/active_copy/attributes.rb', line 37

def deployment_path
  self._deployment_path || "#{DEFAULT_PATH}/#{self.id}.html"
end