Sha256: 7149b4d206b6e8bd9271bb5bf3ca14b429f0e3143c4ead596ddcd918302e40e4

Contents?: true

Size: 473 Bytes

Versions: 5

Compression:

Stored size: 473 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

5 entries across 5 versions & 1 rubygems

Version Path
ruby-lol-0.9.4 lib/lol/model.rb
ruby-lol-0.9.3 lib/lol/model.rb
ruby-lol-0.9.1 lib/lol/model.rb
ruby-lol-0.0.7 lib/lol/model.rb
ruby-lol-0.0.6 lib/lol/model.rb