Class: Character::Instance

Inherits:
Object
  • Object
show all
Defined in:
lib/character/instance.rb

Constant Summary collapse

DEFAULT_NAME =
'admin'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = Instance::DEFAULT_NAME) ⇒ Instance

Returns a new instance of Instance.



23
24
25
26
27
28
29
# File 'lib/character/instance.rb', line 23

def initialize(name = Instance::DEFAULT_NAME)
  @name                   = name.gsub(' ', '-').downcase
  @title                  = 'Character'
  @user_model             = 'Character::User'
   = false
  @force_ssl              = true
end

Instance Attribute Details

#before_indexObject

Returns the value of attribute before_index.



5
6
7
# File 'lib/character/instance.rb', line 5

def before_index
  @before_index
end

#before_saveObject

Returns the value of attribute before_save.



5
6
7
# File 'lib/character/instance.rb', line 5

def before_save
  @before_save
end

#development_auto_loginObject

Returns the value of attribute development_auto_login.



5
6
7
# File 'lib/character/instance.rb', line 5

def 
  
end

#force_sslObject

Returns the value of attribute force_ssl.



5
6
7
# File 'lib/character/instance.rb', line 5

def force_ssl
  @force_ssl
end

#javascript_filenameObject

Returns the value of attribute javascript_filename.



5
6
7
# File 'lib/character/instance.rb', line 5

def javascript_filename
  @javascript_filename
end

#login_backgroundObject

Returns the value of attribute login_background.



5
6
7
# File 'lib/character/instance.rb', line 5

def 
  @login_background
end

#logoObject

Returns the value of attribute logo.



5
6
7
# File 'lib/character/instance.rb', line 5

def 
  
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/character/instance.rb', line 5

def name
  @name
end

#settingsObject

Returns the value of attribute settings.



5
6
7
# File 'lib/character/instance.rb', line 5

def settings
  @settings
end

#stylesheet_filenameObject

Returns the value of attribute stylesheet_filename.



5
6
7
# File 'lib/character/instance.rb', line 5

def stylesheet_filename
  @stylesheet_filename
end

#titleObject

Returns the value of attribute title.



5
6
7
# File 'lib/character/instance.rb', line 5

def title
  @title
end

#user_modelObject

Returns the value of attribute user_model.



5
6
7
# File 'lib/character/instance.rb', line 5

def user_model
  @user_model
end

Instance Method Details

#user_classObject



43
44
45
# File 'lib/character/instance.rb', line 43

def user_class
  @user_class ||= @user_model.constantize
end