Class: GitHack::SimpleLineBuilder

Inherits:
LineBuilder show all
Defined in:
lib/git-hack/simple_line_builder.rb

Instance Attribute Summary collapse

Attributes inherited from LineBuilder

#data, #index

Instance Method Summary collapse

Methods inherited from LineBuilder

#all_objects, #find_all, #get_next, #in?, #is_over?, #object, #out?, #parse, #rest

Constructor Details

#initialize(data, index) ⇒ SimpleLineBuilder

Returns a new instance of SimpleLineBuilder.



7
8
9
# File 'lib/git-hack/simple_line_builder.rb', line 7

def initialize(data,index)
	super(data,index)
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



6
7
8
# File 'lib/git-hack/simple_line_builder.rb', line 6

def value
  @value
end

Instance Method Details

#process_lineObject



10
11
12
13
14
# File 'lib/git-hack/simple_line_builder.rb', line 10

def process_line
	line = @data[@index].chomp.split
	@object = line.shift
	@value = line.shift
end