Sha256: 9b322f1905782164ad4d68302fa3ca47cba5c6aaac8346c7a88978da31dc482f
Contents?: true
Size: 534 Bytes
Versions: 2
Compression:
Stored size: 534 Bytes
Contents
module Artisanal::Model class Config attr_reader :options, :defaults, :writable, :undefined, :symbolize alias_method :writable?, :writable alias_method :undefined?, :undefined alias_method :symbolize?, :symbolize def initialize(options={}) @options = options @defaults = { optional: true }.merge(options.fetch(:defaults, {})) @writable = options.fetch(:writable, false) @undefined = options.fetch(:undefined, false) @symbolize = options.fetch(:symbolize, false) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
artisanal-model-0.2.1 | lib/artisanal/model/config.rb |
artisanal-model-0.2.0 | lib/artisanal/model/config.rb |