Module: ActiveYaml::ClassMethods

Includes:
MethodMapping
Defined in:
lib/active_yaml/class_methods.rb

Overview

A module that allows you to use this gem, without creating instances of the class

Instance Method Summary collapse

Methods included from MethodMapping

#method_missing, #respond_to_missing?

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ActiveYaml::MethodMapping

Instance Method Details

#yaml(file_path) ⇒ Object



12
13
14
15
16
# File 'lib/active_yaml/class_methods.rb', line 12

def yaml(file_path)
  define_singleton_method(:yaml_data) do
    @yaml_data = Parser.parse(file_path)
  end
end