Module: Alephant::Publisher::Views::Base::ClassMethods
- Defined in:
- lib/alephant/publisher/views/base.rb
Instance Attribute Summary collapse
-
#base_path ⇒ Object
Returns the value of attribute base_path.
Instance Method Summary collapse
Instance Attribute Details
#base_path ⇒ Object
Returns the value of attribute base_path.
32 33 34 |
# File 'lib/alephant/publisher/views/base.rb', line 32 def base_path @base_path end |
Instance Method Details
#inherited(subclass) ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/alephant/publisher/views/base.rb', line 34 def inherited(subclass) current_dir = File.dirname(caller.first[/\/[^:]+/]) dir_path = Pathname.new(File.join(current_dir,'..')).realdirpath subclass.base_path = dir_path.to_s Alephant::Publisher::Views.register(subclass) end |