Class: ActiveYaml::BaseModel

Inherits:
Object
  • Object
show all
Includes:
MethodMapping
Defined in:
lib/active_yaml.rb

Overview

Base class to inherit from to create models

Class 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

Class Method Details

.yaml(file_path) ⇒ Object



16
17
18
19
20
# File 'lib/active_yaml.rb', line 16

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