Module: TTY::Config::Marshaller

Defined Under Namespace

Modules: ExtensionsStore

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object

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.


9
10
11
12
13
14
15
# File 'lib/tty/config/marshaller.rb', line 9

def self.included(base)
  super
  # Help marshallers to declare their gem dependency
  base.extend DependencyLoader
  # Help marshallers to declare their extension matching
  base.extend ExtensionsStore
end

Instance Method Details

#marshal(_object, _options = {}) ⇒ Object

Marshal object into a given format

Parameters:

  • _object (Object)

Raises:

  • (NotImplementedError)

42
43
44
# File 'lib/tty/config/marshaller.rb', line 42

def marshal(_object, _options = {})
  raise NotImplementedError
end

#unmarshal(_content, _options = {}) ⇒ Object

Unmarshal content into a hash object

Parameters:

  • _content (String)

Raises:

  • (NotImplementedError)

51
52
53
# File 'lib/tty/config/marshaller.rb', line 51

def unmarshal(_content, _options = {})
  raise NotImplementedError
end