OSDN Git Service

t#31144:add writing_format
[pettanr/pettanr.git] / config / application.rb
index 3217e06..2f2960f 100644 (file)
@@ -17,7 +17,7 @@ if defined?(Bundler)
 end
 
 module Pettanr
-  VERSION = '0.6.0'
+  VERSION = '0.6.1'
   class Application < Rails::Application
     # Settings in config/environments/* take precedence over those specified here.
     # Application configuration should go into files in config/initializers
@@ -61,21 +61,39 @@ config.assets.initialize_on_precompile = false
     end
     
     def self.licenses
-      @@licenses
+      @@licenses || {}
     end
-     
+    
     def self.speech_balloons=(ary)
       @@speech_balloons = ary
     end
     
     def self.speech_balloons
-      @@speech_balloons
+      @@speech_balloons || {}
+    end
+     
+    def self.writing_formats=(ary)
+      @@writing_formats = ary
+    end
+    
+    def self.writing_formats
+      @@writing_formats || {}
     end
- end
+    
+    def self.elements=(ary)
+      @@elements = ary
+    end
+    
+    def self.elements
+      @@elements || {}
+    end
+  end
 end
   
 Pettanr::Application.licenses = YAML.load(open(Rails.root + 'config/license.yml').read)
 Pettanr::Application.speech_balloons = YAML.load(open(Rails.root + 'config/speech_balloon.yml').read)
+Pettanr::Application.writing_formats = YAML.load(open(Rails.root + 'config/writing_format.yml').read)
+Pettanr::Application.elements = YAML.load(open(Rails.root + 'config/element.yml').read)
 MagicNumber = YAML.load(open(Rails.root + 'config/magic_number.yml').read)
 MagicNumber['test_layout'] = if File.exist? Rails.root + 'config/test_layout'
   'test'