Class: Ars::Medium::Model

Inherits:
Object
  • Object
show all
Defined in:
lib/ars/medium/model.rb

Class Method Summary collapse

Class Method Details

.filter_root_element(root_element) ⇒ Object



7
8
9
# File 'lib/ars/medium/model.rb', line 7

def self.filter_root_element(root_element)
  root_element.to_s.sub(/_medium$/, '').to_sym
end

.inherited(subclass) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/ars/medium/model.rb', line 11

def self.inherited(subclass)
  subclass.include Her::Model
  subclass.include Ars::Familiar
  subclass.include Ars::Familiar::Scribe

  subclass.use_api Ars::Medium::Link.prime
  subclass.root_element filter_root_element(subclass.root_element)
end