Class: ConfigType::Ruby

Inherits:
Object
  • Object
show all
Defined in:
lib/config_file/config_type.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extensionsObject



23
24
25
# File 'lib/config_file/config_type.rb', line 23

def self.extensions
  [".rb"]
end

Instance Method Details

#read(file_name) ⇒ Object



27
28
29
30
31
# File 'lib/config_file/config_type.rb', line 27

def read file_name
  content = File.open(file_name).read

  MetaMethods::Core.instance.block_to_hash(content)
end