Class: Svnx::Log::EntryPath

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = Hash.new) ⇒ EntryPath

Returns a new instance of EntryPath.



17
18
19
20
21
# File 'lib/svnx/log/entrypath.rb', line 17

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.



15
16
17
# File 'lib/svnx/log/entrypath.rb', line 15

def action
  @action
end

#kindObject (readonly)

Returns the value of attribute kind.



15
16
17
# File 'lib/svnx/log/entrypath.rb', line 15

def kind
  @kind
end

#nameObject (readonly)

Returns the value of attribute name.



15
16
17
# File 'lib/svnx/log/entrypath.rb', line 15

def name
  @name
end

Instance Method Details

#<=>(other) ⇒ Object



27
28
29
# File 'lib/svnx/log/entrypath.rb', line 27

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

#match?(action, filter) ⇒ Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/svnx/log/entrypath.rb', line 31

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

#to_sObject



23
24
25
# File 'lib/svnx/log/entrypath.rb', line 23

def to_s
  @name
end