Module: ThinModels
- Defined in:
- lib/thin_models/errors.rb,
lib/thin_models/struct.rb,
lib/thin_models/version.rb,
lib/thin_models/lazy_array.rb,
lib/thin_models/struct/identity.rb
Defined Under Namespace
Classes: LazyArray, PartialDataError, Struct
Constant Summary collapse
- VERSION =
"0.2.1"
Class Method Summary collapse
-
.Struct(*attributes) ⇒ Object
todo: add a ? to boolean getters.
- .StructWithIdentity(*attributes) ⇒ Object
Class Method Details
.Struct(*attributes) ⇒ Object
todo: add a ? to boolean getters
189 190 191 192 193 |
# File 'lib/thin_models/struct.rb', line 189 def self.Struct(*attributes) Class.new(Struct) do attributes.each {|a| attribute(a)} end end |
.StructWithIdentity(*attributes) ⇒ Object
36 37 38 39 40 41 |
# File 'lib/thin_models/struct/identity.rb', line 36 def self.StructWithIdentity(*attributes) Class.new(Struct) do identity_attribute attributes.each {|a| attribute(a)} end end |