Class: MultiGit::Config::Schema::Subsection

Inherits:
Object
  • Object
show all
Defined in:
lib/multi_git/config/schema.rb

Instance Method Summary collapse

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

#integer(name, default = nil) ⇒ Object Also known as: int



113
114
115
# File 'lib/multi_git/config/schema.rb', line 113

def integer(name, default = nil)
  @hash[name] = Integer.new(default)
end

#string(name, default = nil) ⇒ Object



117
118
119
# File 'lib/multi_git/config/schema.rb', line 117

def string(name, default = nil)
  @hash[name] = String.new(default)
end