Class: Chozo::Config::Abstract Private

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
VariaModel
Defined in:
lib/chozo/config/abstract.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Author:

Direct Known Subclasses

JSON

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from VariaModel

#_attributes_, #errors, #from_hash, #from_json, #get_attribute, included, #mass_assign, #set_attribute, #to_json, #valid?, #validate

Constructor Details

#initialize(path = nil, attributes = {}) ⇒ Abstract

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Abstract.

Parameters:

  • path (String) (defaults to: nil)
  • attributes (Hash) (defaults to: {})


19
20
21
22
23
# File 'lib/chozo/config/abstract.rb', line 19

def initialize(path = nil, attributes = {})
  @path = File.expand_path(path) if path

  mass_assign(attributes)
end

Instance Attribute Details

#pathObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



11
12
13
# File 'lib/chozo/config/abstract.rb', line 11

def path
  @path
end

Instance Method Details

#to_hashObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



25
26
27
# File 'lib/chozo/config/abstract.rb', line 25

def to_hash
  super.to_hash.deep_symbolize_keys
end