Class: Yamo::Singleton

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/yamo/singleton.rb

Instance Attribute Summary

Attributes inherited from Object

#data

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Object

create_accessors, load_and_validate_file, load_and_validate_source, schema, validate_data, validator

Constructor Details

#initializeSingleton

Returns a new instance of Singleton.



16
17
18
# File 'lib/yamo/singleton.rb', line 16

def initialize
  @data = @@data
end

Class Method Details

.object(file) ⇒ Object



11
12
13
14
# File 'lib/yamo/singleton.rb', line 11

def self.object(file)
  @@data = self.load_and_validate_file(file)
  @object = file
end