Class: Avm::Scms::AutoCommit::Rules::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/avm/scms/auto_commit/rules/base.rb

Direct Known Subclasses

Last, Manual, New, Nth, Unique

Defined Under Namespace

Classes: WithFile

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.keysObject



12
13
14
# File 'lib/avm/scms/auto_commit/rules/base.rb', line 12

def keys
  [long_key, short_key]
end

.long_keyObject



16
17
18
# File 'lib/avm/scms/auto_commit/rules/base.rb', line 16

def long_key
  name.demodulize.variableize
end

.short_keyObject



20
21
22
# File 'lib/avm/scms/auto_commit/rules/base.rb', line 20

def short_key
  long_key[0, 1]
end

Instance Method Details

#with_file(file) ⇒ Object



25
26
27
# File 'lib/avm/scms/auto_commit/rules/base.rb', line 25

def with_file(file)
  self.class.const_get('WithFile').new(self, file)
end