Class: Bogy::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/bogy/handler.rb

Overview

Abstract class for handlers (FileHandler, HashHandler…) Handler is object, which can work with certain data type (string, YAML file and etc.) and convert it to Ruby hash

Direct Known Subclasses

FileHandler, HashHandler, StringHandler

Instance Method Summary collapse

Instance Method Details

#hashObject



10
11
12
13
14
15
# File 'lib/bogy/handler.rb', line 10

def hash
  @hash ||= load
  @hash = {} if @hash.nil?

  @hash
end

#loadObject

Abstract method Used to convert raw YAML data from specified format to Ruby hash



21
# File 'lib/bogy/handler.rb', line 21

def load; end