Sha256: fe314d3c00de65d90a67fd41e96e7f7756a81f647cffbcf2fca9a981133a0590

Contents?: true

Size: 206 Bytes

Versions: 3

Compression:

Stored size: 206 Bytes

Contents

module LetterGenerator
  class Sender
    attr_reader :data

    def initialize(data)
      @data = Hash(data)
    end

    def method_missing(*args)
      data[args.flatten.first.to_sym]
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
letter_generator-0.2.2 lib/letter_generator/sender.rb
letter_generator-0.2.1 lib/letter_generator/sender.rb
letter_generator-0.2.0 lib/letter_generator/sender.rb