Sha256: 8d1d3dc8d9d16f212a1a88bc0c5cfc921bfafa63923951636c9de7734b5c02a6

Contents?: true

Size: 471 Bytes

Versions: 1

Compression:

Stored size: 471 Bytes

Contents

require 'active_support/core_ext/string/inflections'

module Lol
  class Model
    # @!attribute [r] raw
    # @return [Hash] raw version of options Hash used to initialize Model
    attr_reader :raw

    # Initializes a Lol::Model
    # @param options [Hash]
    # @return [Lol::Model]
    def initialize options = {}
      @raw = options
      options.each do |attribute_name, value|
        send "#{attribute_name.to_s.underscore}=", value
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-lol-0.9.5 lib/lol/model.rb