Skip to content
Snippets Groups Projects
base.rb 308 B
Newer Older
Arnaud Levy's avatar
wip
Arnaud Levy committed
class Communication::Block::Component::Base
  attr_reader :property, :template

  def initialize(property, template)
    @property = property.to_s
    @template = template
  end

Arnaud Levy's avatar
Arnaud Levy committed
  def data
Arnaud Levy's avatar
wip
Arnaud Levy committed
    data[property]
  end

Arnaud Levy's avatar
Arnaud Levy committed
  def data=(value)
    data[property] = value
Arnaud Levy's avatar
wip
Arnaud Levy committed
  end

  def data
    template.data
  end
end