Class: TinyMCE::Rails::ConfigurationFile

Inherits:
Object
  • Object
show all
Defined in:
lib/tinymce/rails/configuration_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#pathObject (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

Returns:

  • (Boolean)


18
19
20
# File 'lib/tinymce/rails/configuration_file.rb', line 18

def changed?
  @last_loaded != last_updated
end

#configurationObject



9
10
11
12
# File 'lib/tinymce/rails/configuration_file.rb', line 9

def configuration
  @configuration = load_configuration if reload?
  @configuration
end

#reload?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/tinymce/rails/configuration_file.rb', line 14

def reload?
  @configuration.nil? || (reloadable? && changed?)
end