Class: Carrier::Configuration

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/carrier/configuration.rb,
lib/carrier/configuration/user.rb,
lib/carrier/configuration/models.rb,
lib/carrier/configuration/routes.rb

Defined Under Namespace

Classes: Models, Routes, User

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#routes_prefix=(value) ⇒ Object (writeonly)

Sets the attribute routes_prefix

Parameters:

  • value

    the value to set the attribute routes_prefix to.



7
8
9
# File 'lib/carrier/configuration.rb', line 7

def routes_prefix=(value)
  @routes_prefix = value
end

Instance Method Details

#check_unread!Object



29
30
31
# File 'lib/carrier/configuration.rb', line 29

def check_unread!
  puts "Add 'acts_as_reader' into your User model" unless ReadMark.reader_class
end

#confObject



21
22
23
# File 'lib/carrier/configuration.rb', line 21

def conf
  Carrier::Configuration
end

#conf_class(component) ⇒ Object



17
18
19
# File 'lib/carrier/configuration.rb', line 17

def conf_class component
  "#{conf}::#{component.to_s.camelize}".constantize
end

#rootObject



25
26
27
# File 'lib/carrier/configuration.rb', line 25

def root
  File.expand_path("../../..", __FILE__)
end