Module: Alephant::Renderer::Views::Base::ClassMethods
- Defined in:
- lib/alephant/renderer/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.
38 39 40 |
# File 'lib/alephant/renderer/views/base.rb', line 38 def base_path @base_path end |
Instance Method Details
#inherited(subclass) ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'lib/alephant/renderer/views/base.rb', line 40 def inherited(subclass) current_dir = File.dirname(caller.first[%r{/[^:]+}]) dir_path = Pathname.new(File.join(current_dir, '..')).realdirpath subclass.base_path = dir_path.to_s Alephant::Renderer::Views.register(subclass) end |