Class: TinyMCE::Rails::ConfigurationFile
- Inherits:
-
Object
- Object
- TinyMCE::Rails::ConfigurationFile
- Defined in:
- lib/tinymce/rails/configuration_file.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #changed? ⇒ Boolean
- #configuration ⇒ Object
-
#initialize(path) ⇒ ConfigurationFile
constructor
A new instance of ConfigurationFile.
- #reload? ⇒ Boolean
Constructor Details
#initialize(path) ⇒ ConfigurationFile
Returns a new instance of ConfigurationFile.
5 6 7 |
# File 'lib/tinymce/rails/configuration_file.rb', line 5 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/tinymce/rails/configuration_file.rb', line 3 def path @path end |
Instance Method Details
#changed? ⇒ Boolean
18 19 20 |
# File 'lib/tinymce/rails/configuration_file.rb', line 18 def changed? @last_loaded != last_updated end |
#configuration ⇒ Object
9 10 11 12 |
# File 'lib/tinymce/rails/configuration_file.rb', line 9 def configuration @configuration = load_configuration if reload? @configuration end |
#reload? ⇒ Boolean
14 15 16 |
# File 'lib/tinymce/rails/configuration_file.rb', line 14 def reload? @configuration.nil? || (reloadable? && changed?) end |