Class: Gitdocs::Configuration::Config
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Gitdocs::Configuration::Config
- Defined in:
- lib/gitdocs/configuration.rb
Overview
NOTE: This record has been kept as a subclass to avoid changing the database table. There are other ways to achieve this, but this seemed most clear for now. [2015-06-26 – acant]
Instance Attribute Summary collapse
-
#start_frontend_port ⇒ Boolean
Defaults to true.
-
#web_frontend_port ⇒ Integer
Defaults to 8888.
Class Method Summary collapse
Instance Attribute Details
#start_frontend_port ⇒ Boolean
Returns defaults to true.
42 43 44 45 46 47 48 49 |
# File 'lib/gitdocs/configuration.rb', line 42 class Config < ActiveRecord::Base # @return [Gitdocs::Configuration::Config] def self.global fail if all.size > 1 create! if all.empty? all.first end end |
#web_frontend_port ⇒ Integer
Returns defaults to 8888.
42 43 44 45 46 47 48 49 |
# File 'lib/gitdocs/configuration.rb', line 42 class Config < ActiveRecord::Base # @return [Gitdocs::Configuration::Config] def self.global fail if all.size > 1 create! if all.empty? all.first end end |
Class Method Details
.global ⇒ Gitdocs::Configuration::Config
44 45 46 47 48 |
# File 'lib/gitdocs/configuration.rb', line 44 def self.global fail if all.size > 1 create! if all.empty? all.first end |