Class: Character::Instance
- Inherits:
-
Object
- Object
- Character::Instance
- Defined in:
- lib/character/instance.rb
Constant Summary collapse
- DEFAULT_NAME =
'admin'
Instance Attribute Summary collapse
-
#before_index ⇒ Object
Returns the value of attribute before_index.
-
#before_save ⇒ Object
Returns the value of attribute before_save.
-
#development_auto_login ⇒ Object
Returns the value of attribute development_auto_login.
-
#force_ssl ⇒ Object
Returns the value of attribute force_ssl.
-
#javascript_filename ⇒ Object
Returns the value of attribute javascript_filename.
-
#login_background ⇒ Object
Returns the value of attribute login_background.
-
#logo ⇒ Object
Returns the value of attribute logo.
-
#name ⇒ Object
Returns the value of attribute name.
-
#settings ⇒ Object
Returns the value of attribute settings.
-
#stylesheet_filename ⇒ Object
Returns the value of attribute stylesheet_filename.
-
#title ⇒ Object
Returns the value of attribute title.
-
#user_model ⇒ Object
Returns the value of attribute user_model.
Instance Method Summary collapse
-
#initialize(name = Instance::DEFAULT_NAME) ⇒ Instance
constructor
A new instance of Instance.
- #user_class ⇒ Object
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' @development_auto_login = false @force_ssl = true end |
Instance Attribute Details
#before_index ⇒ Object
Returns the value of attribute before_index.
5 6 7 |
# File 'lib/character/instance.rb', line 5 def before_index @before_index end |
#before_save ⇒ Object
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_login ⇒ Object
Returns the value of attribute development_auto_login.
5 6 7 |
# File 'lib/character/instance.rb', line 5 def development_auto_login @development_auto_login end |
#force_ssl ⇒ Object
Returns the value of attribute force_ssl.
5 6 7 |
# File 'lib/character/instance.rb', line 5 def force_ssl @force_ssl end |
#javascript_filename ⇒ Object
Returns the value of attribute javascript_filename.
5 6 7 |
# File 'lib/character/instance.rb', line 5 def javascript_filename @javascript_filename end |
#login_background ⇒ Object
Returns the value of attribute login_background.
5 6 7 |
# File 'lib/character/instance.rb', line 5 def login_background @login_background end |
#logo ⇒ Object
Returns the value of attribute logo.
5 6 7 |
# File 'lib/character/instance.rb', line 5 def logo @logo end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/character/instance.rb', line 5 def name @name end |
#settings ⇒ Object
Returns the value of attribute settings.
5 6 7 |
# File 'lib/character/instance.rb', line 5 def settings @settings end |
#stylesheet_filename ⇒ Object
Returns the value of attribute stylesheet_filename.
5 6 7 |
# File 'lib/character/instance.rb', line 5 def stylesheet_filename @stylesheet_filename end |
#title ⇒ Object
Returns the value of attribute title.
5 6 7 |
# File 'lib/character/instance.rb', line 5 def title @title end |
#user_model ⇒ Object
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_class ⇒ Object
43 44 45 |
# File 'lib/character/instance.rb', line 43 def user_class @user_class ||= @user_model.constantize end |