Class: Bp3::String::MapperBase

Inherits:
Object
  • Object
show all
Includes:
Subclassable
Defined in:
lib/bp3/string/mapper_base.rb

Overview

MapperBase provides the base class for controller and model mappings

Direct Known Subclasses

TableControllerMap, TableModelMap

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.build_hashObject



18
19
20
# File 'lib/bp3/string/mapper_base.rb', line 18

def self.build_hash
  new.build_hash
end

.hashObject



22
23
24
# File 'lib/bp3/string/mapper_base.rb', line 22

def self.hash
  cached_hash
end

.reset_cached_hashObject



14
15
16
# File 'lib/bp3/string/mapper_base.rb', line 14

def self.reset_cached_hash
  @cached_hash = nil
end

.testing?Boolean

override in testing if needed

Returns:

  • (Boolean)


10
11
12
# File 'lib/bp3/string/mapper_base.rb', line 10

def self.testing?
  false
end

Instance Method Details

#hashObject



26
27
28
# File 'lib/bp3/string/mapper_base.rb', line 26

def hash
  self.class.hash
end

#sti_subclass?(model) ⇒ Boolean (private)

Returns:

  • (Boolean)


32
33
34
# File 'lib/bp3/string/mapper_base.rb', line 32

def sti_subclass?(model)
  self.class.sti_subclass?(model)
end

#subclassed?(model) ⇒ Boolean (private)

Returns:

  • (Boolean)


36
37
38
# File 'lib/bp3/string/mapper_base.rb', line 36

def subclassed?(model)
  self.class.subclassed?(model)
end