Method: Havior::Model#initialize

Defined in:
lib/havior/model.rb

#initialize(id) ⇒ Model



4
5
6
7
8
9
10
11
# File 'lib/havior/model.rb', line 4

def initialize id
  prefix = "havior"
  components = self.class.name.underscore.split("/")[0..-2]
  @dir = components.join("/")
  html_class_name = prefix + "-" + components.join("-")
  @html_identifier = "#{html_class_name}-#{id}"
  @html_classes = ["havior", html_class_name]
end