Class: Economic::Relation

Inherits:
Object
  • Object
show all
Defined in:
lib/economic/relation.rb

Instance Method Summary collapse

Instance Method Details

#economic_nameObject



3
4
5
6
7
# File 'lib/economic/relation.rb', line 3

def economic_name
  return as.to_s unless as.to_s.blank?

  name.to_s.camelize(:lower)
end

#klassObject



9
10
11
# File 'lib/economic/relation.rb', line 9

def klass
  super&.constantize || "Economic::Models::#{name.to_s.classify}".constantize
end

#multiple?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/economic/relation.rb', line 13

def multiple?
  multiple
end