lib/osheet/workbook_element.rb in osheet-0.4.0 vs lib/osheet/workbook_element.rb in osheet-0.5.0

- old
+ new

@@ -1,21 +1,17 @@ module Osheet::WorkbookElement - class << self - def included(receiver) + def workbook + get_ivar(:workbook) + end - receiver.send(:attr_reader, :workbook) - - [:styles, :templates].each do |thing| - receiver.send(:define_method, thing) do - if workbook && workbook.respond_to?(thing) - workbook.send(thing) - else - nil - end - end + [:styles, :templates].each do |thing| + define_method(thing) do + if workbook && workbook.respond_to?(thing) + workbook.send(thing) + else + nil end - end - end + end