lib/base_presenter.rb in base_presenter-0.0.7 vs lib/base_presenter.rb in base_presenter-0.0.8

- old
+ new

@@ -19,21 +19,21 @@ else content_tag :span, "None given", class: "none" end end - class << self - attr_accessor :template + def self.initialize(object, template) + @@object = object + @@template = template + end - def presents(name) - define_method(name) do - @object - end + def self.presents(name) + define_method(name) do + @object end + end - def method_missing(*args, &block) - @@template.send(*args, &block) - end - + def self.method_missing(*args, &block) + @@template.send(*args, &block) end end