Sha256: ab5cd8c3141b5a59be3fb0f87982db42147645c9941c63b371006d4877455203
Contents?: true
Size: 383 Bytes
Versions: 1
Compression:
Stored size: 383 Bytes
Contents
require 'extensions/hash' module Moblues module DataModel class Attribute < Struct.new(:name, :type, :optional) def initialize(params) p = params.compact optional = false optional = p.fetch(:optional) if p.key?(:optional) super( p.fetch(:name), p.fetch(:type), optional ) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
moblues-0.4.0 | lib/moblues/data_model/attribute.rb |