Module: Optimacms::MetaContent::ClassMethods

Defined in:
app/models/concerns/optimacms/meta_content.rb

Overview

methods defined here are going to extend the class, not the instance of it

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_sym, *arguments, &block) ⇒ Object


38
39
40
41
42
43
44
45
46
# File 'app/models/concerns/optimacms/meta_content.rb', line 38

def method_missing(method_sym, *arguments, &block)
  if method_sym.to_s =~ /^meta_(.*)_(.*)$/
    t, lang = $1, $2
    #find($1.to_sym => arguments.first)
    #self.x=0
  else
    super
  end
end

Instance Method Details

#dir_metaObject

settings


51
52
53
# File 'app/models/concerns/optimacms/meta_content.rb', line 51

def dir_meta

end

#make_meta(langs) ⇒ Object


28
29
30
31
32
33
34
35
36
# File 'app/models/concerns/optimacms/meta_content.rb', line 28

def make_meta(langs)
  langs.each do |lang|
    define_method("meta_keywords_#{lang}") do
      #puts "@#{name} was set to #{val}"
      #instance_variable_set("@#{name}", val)
      x=0
    end
  end
end

#tag_limit(value) ⇒ Object


55
56
57
# File 'app/models/concerns/optimacms/meta_content.rb', line 55

def tag_limit(value)
  self.tag_limit_value = value
end