Class: Parse::Conf::GitosisStyle

Inherits:
Object
  • Object
show all
Defined in:
lib/parse/conf/gitosis_style.rb

Constant Summary collapse

Helper =
Parse::Conf::ParserHelper

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config_raw, separator = " ") ⇒ GitosisStyle



10
11
12
13
14
15
16
17
# File 'lib/parse/conf/gitosis_style.rb', line 10

def initialize(config_raw, separator = " ")
  @config_raw = config_raw
  @data = {}
  
  @empty_group_name = 'without_group'
  @separator = separator 
  @data[empty_group_name] = []        
end

Instance Attribute Details

#config_rawObject (readonly)

Returns the value of attribute config_raw.



6
7
8
# File 'lib/parse/conf/gitosis_style.rb', line 6

def config_raw
  @config_raw
end

#dataObject (readonly)

Returns the value of attribute data.



6
7
8
# File 'lib/parse/conf/gitosis_style.rb', line 6

def data
  @data
end

#empty_group_nameObject (readonly)

Returns the value of attribute empty_group_name.



6
7
8
# File 'lib/parse/conf/gitosis_style.rb', line 6

def empty_group_name
  @empty_group_name
end

Class Method Details

.run(config_raw, separator = " ") ⇒ Object



24
25
26
27
# File 'lib/parse/conf/gitosis_style.rb', line 24

def self.run(config_raw, separator = " ")
  obj = new(config_raw, separator)
  obj.result
end

Instance Method Details

#resultObject



19
20
21
22
# File 'lib/parse/conf/gitosis_style.rb', line 19

def result
  parse unless @parsed
  @data 
end