module Alephant::Renderer::Views::Base::InstanceMethods

Attributes

base_path[R]
content_type[R]
data[R]

Public Class Methods

new(data = {}) click to toggle source
# File lib/alephant/renderer/views/base.rb, line 17
def initialize(data = {})
  @data = Hashie::Mash.new data
  @base_path = self.class.base_path

  setup
end

Public Instance Methods

setup() click to toggle source
# File lib/alephant/renderer/views/base.rb, line 30
def setup; end
to_h() click to toggle source
# File lib/alephant/renderer/views/base.rb, line 24
def to_h
  whitelist.reduce({}) do |accum, method_key|
    accum.tap { |a| a[method_key] = send(method_key) }
  end
end
whitelist() click to toggle source
# File lib/alephant/renderer/views/base.rb, line 32
def whitelist
  []
end