Class: Svn::Scm::Adapters::Info

Inherits:
Object
  • Object
show all
Defined in:
lib/Svn/scm/adapters/subversion.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Info

Returns a new instance of Info.



223
224
225
226
# File 'lib/Svn/scm/adapters/subversion.rb', line 223

def initialize(attributes={})
	self.root_url = attributes[:root_url] if attributes[:root_url]
	self.lastrev = attributes[:lastrev]
end

Instance Attribute Details

#lastrevObject

Returns the value of attribute lastrev.



222
223
224
# File 'lib/Svn/scm/adapters/subversion.rb', line 222

def lastrev
  @lastrev
end

#root_urlObject

Returns the value of attribute root_url.



222
223
224
# File 'lib/Svn/scm/adapters/subversion.rb', line 222

def root_url
  @root_url
end

Class Method Details

.get_instance(doc) ⇒ Object



227
228
229
230
231
232
233
234
235
# File 'lib/Svn/scm/adapters/subversion.rb', line 227

def self.get_instance(doc)
	new({:root_url => doc['info']['entry']['repository']['root']['__content__'],
		:lastrev => Revision.new({
			:identifier => doc['info']['entry']['commit']['revision'],
			:time => Time.parse(doc['info']['entry']['commit']['date']['__content__']).localtime,
			:author => (doc['info']['entry']['commit']['author'] ? doc['info']['entry']['commit']['author']['__content__'] : "")
		})
	})
end