Class: MultiGit::Config::Schema::Subsection
- Inherits:
-
Object
- Object
- MultiGit::Config::Schema::Subsection
- Defined in:
- lib/multi_git/config/schema.rb
Instance Method Summary collapse
- #array(name, default = []) ⇒ Object
- #bool(name, default = nil) ⇒ Object
-
#initialize(hash) ⇒ Subsection
constructor
A new instance of Subsection.
- #integer(name, default = nil) ⇒ Object (also: #int)
- #string(name, default = nil) ⇒ Object
Constructor Details
#initialize(hash) ⇒ Subsection
Returns a new instance of Subsection.
109 110 111 |
# File 'lib/multi_git/config/schema.rb', line 109 def initialize(hash) @hash = hash end |
Instance Method Details
#array(name, default = []) ⇒ Object
121 122 123 |
# File 'lib/multi_git/config/schema.rb', line 121 def array(name, default = []) @hash[name] = Array.new(default) end |
#bool(name, default = nil) ⇒ Object
125 126 127 |
# File 'lib/multi_git/config/schema.rb', line 125 def bool(name, default = nil) @hash[name] = Boolean.new(default) end |