Class: Rbcli::UserConf::Null
- Inherits:
-
Backend
- Object
- Backend
- Rbcli::UserConf::Null
show all
- Defined in:
- lib/rbcli/components/config/backends/null.rb
Overview
Rbcli – A framework for developing command line applications in Ruby #
Copyright (C) 2024 Andrew Khoury <[email protected]> #
Instance Attribute Summary
Attributes inherited from Backend
#loaded, #type
Instance Method Summary
collapse
Methods inherited from Backend
#annotate!, create, inherited, types
Constructor Details
#initialize(filename, type) ⇒ Null
Returns a new instance of Null.
7
8
9
10
|
# File 'lib/rbcli/components/config/backends/null.rb', line 7
def initialize filename, type
@type = type.to_s.upcase
@loaded = false
end
|
Instance Method Details
#exist? ⇒ Boolean
29
30
31
|
# File 'lib/rbcli/components/config/backends/null.rb', line 29
def exist?
true
end
|
#load(_defaults = nil) ⇒ Object
12
13
14
15
|
# File 'lib/rbcli/components/config/backends/null.rb', line 12
def load _defaults = nil
@loaded = true
{}
end
|
#savable? ⇒ Boolean
25
26
27
|
# File 'lib/rbcli/components/config/backends/null.rb', line 25
def savable?
false
end
|
#save(hash) ⇒ Object
17
18
19
|
# File 'lib/rbcli/components/config/backends/null.rb', line 17
def save hash
hash
end
|
#save_raw(text) ⇒ Object
21
22
23
|
# File 'lib/rbcli/components/config/backends/null.rb', line 21
def save_raw text
true
end
|