Class: Fragmentary::Config

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/fragmentary/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



13
14
15
16
17
18
19
20
21
# File 'lib/fragmentary/config.rb', line 13

def initialize
  # default
  @current_user_method = :current_user
  @application_root_url_column = :application_root_url
  @remote_urls = []
  @insert_timestamps = false
  @deployed_at = nil
  @release_name = nil
end

Instance Attribute Details

#application_root_url_columnObject

Returns the value of attribute application_root_url_column.



11
12
13
# File 'lib/fragmentary/config.rb', line 11

def application_root_url_column
  @application_root_url_column
end

#current_user_methodObject

Returns the value of attribute current_user_method.



7
8
9
# File 'lib/fragmentary/config.rb', line 7

def current_user_method
  @current_user_method
end

#default_user_type_mappingObject

Returns the value of attribute default_user_type_mapping.



7
8
9
# File 'lib/fragmentary/config.rb', line 7

def default_user_type_mapping
  @default_user_type_mapping
end

#deployed_atObject

Returns the value of attribute deployed_at.



7
8
9
# File 'lib/fragmentary/config.rb', line 7

def deployed_at
  @deployed_at
end

#get_sign_in_pathObject

Returns the value of attribute get_sign_in_path.



7
8
9
# File 'lib/fragmentary/config.rb', line 7

def 
  @get_sign_in_path
end

#insert_timestampsObject

Returns the value of attribute insert_timestamps.



7
8
9
# File 'lib/fragmentary/config.rb', line 7

def insert_timestamps
  @insert_timestamps
end

#post_sign_in_pathObject

Returns the value of attribute post_sign_in_path.



7
8
9
# File 'lib/fragmentary/config.rb', line 7

def 
  @post_sign_in_path
end

#release_nameObject

Returns the value of attribute release_name.



7
8
9
# File 'lib/fragmentary/config.rb', line 7

def release_name
  @release_name
end

#remote_urlsObject

Returns the value of attribute remote_urls.



7
8
9
# File 'lib/fragmentary/config.rb', line 7

def remote_urls
  @remote_urls
end

#sign_out_pathObject

Returns the value of attribute sign_out_path.



7
8
9
# File 'lib/fragmentary/config.rb', line 7

def sign_out_path
  @sign_out_path
end

#user_typesObject

Returns the value of attribute user_types.



7
8
9
# File 'lib/fragmentary/config.rb', line 7

def user_types
  @user_types
end

#usersObject

Returns the value of attribute users.



7
8
9
# File 'lib/fragmentary/config.rb', line 7

def users
  @users
end

Instance Method Details

#session_users=(session_users) ⇒ Object



23
24
25
26
# File 'lib/fragmentary/config.rb', line 23

def session_users=(session_users)
  raise "config.session_users must be a Hash" unless session_users.is_a?(Hash)
  @user_types = Fragmentary.parse_session_users(session_users)
end