Class: Bogy::Handler
- Inherits:
-
Object
- Object
- Bogy::Handler
- 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
Instance Method Summary collapse
- #hash ⇒ Object
-
#load ⇒ Object
Abstract method Used to convert raw YAML data from specified format to Ruby hash.
Instance Method Details
#hash ⇒ Object
10 11 12 13 14 15 |
# File 'lib/bogy/handler.rb', line 10 def hash @hash ||= load @hash = {} if @hash.nil? @hash end |
#load ⇒ Object
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 |