Class: ActiveYaml::Base
- Inherits:
-
ActiveFile::Base
- Object
- ActiveHash::Base
- ActiveFile::Base
- ActiveYaml::Base
- Defined in:
- lib/active_yaml/base.rb
Instance Attribute Summary
Attributes inherited from ActiveHash::Base
Class Method Summary collapse
Methods inherited from ActiveFile::Base
all, delete_all, full_path, reload, set_filename, set_root_path
Methods inherited from ActiveHash::Base
all, auto_assign_fields, base_class, configuration_for_custom_finder, count, create, create!, data=, define_custom_find_all_method, define_custom_find_method, define_getter_method, define_interrogator_method, define_setter_method, delete_all, #eql?, field, fields, find, find_by_id, #hash, #id, #id=, #initialize, insert, method_missing, #new_record?, next_id, #readonly?, respond_to?, #save, #to_param, transaction, #valid?
Constructor Details
This class inherits a constructor from ActiveHash::Base
Class Method Details
.extension ⇒ Object
17 18 19 |
# File 'lib/active_yaml/base.rb', line 17 def extension "yml" end |
.load_file ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/active_yaml/base.rb', line 5 def load_file if (data = raw_data).is_a?(Array) data else data.values end end |
.raw_data ⇒ Object
13 14 15 |
# File 'lib/active_yaml/base.rb', line 13 def raw_data YAML.load_file(full_path) end |