Class: SVNx::Log::LogEntryPath

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/svnx/log/entry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = Hash.new) ⇒ LogEntryPath

Returns a new instance of LogEntryPath.



54
55
56
57
58
# File 'lib/svnx/log/entry.rb', line 54

def initialize args = Hash.new
  @kind = args[:kind]
  @action = args[:action]
  @name = args[:name]
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



52
53
54
# File 'lib/svnx/log/entry.rb', line 52

def action
  @action
end

#kindObject (readonly)

Returns the value of attribute kind.



52
53
54
# File 'lib/svnx/log/entry.rb', line 52

def kind
  @kind
end

#nameObject (readonly)

Returns the value of attribute name.



52
53
54
# File 'lib/svnx/log/entry.rb', line 52

def name
  @name
end

Instance Method Details

#<=>(other) ⇒ Object



64
65
66
# File 'lib/svnx/log/entry.rb', line 64

def <=> other
  name <=> other.name
end

#match?(action, filter) ⇒ Boolean

Returns:

  • (Boolean)


68
69
70
# File 'lib/svnx/log/entry.rb', line 68

def match? action, filter
  @action.to_s == action.to_s && @name.start_with?(filter)
end

#to_sObject



60
61
62
# File 'lib/svnx/log/entry.rb', line 60

def to_s
  @name
end