lib/koine/attributes.rb in koine-attributes-0.1.0 vs lib/koine/attributes.rb in koine-attributes-0.1.1
- old
+ new
@@ -4,12 +4,10 @@
# provides the following API
#
# @example using attributes
# class Person
-# include Koine::Attributes
-#
# attributes do
# attribute :name, :string
# attribute :birthday, :date
#
# # or
@@ -34,12 +32,10 @@
# end
#
# @example Constructor for attributes
#
# class Person
-# include Koine::Attributes
-#
# attributes initializer: true do
# attribute :name, :string
# attribute :birthday, :date
# end
# end
@@ -50,12 +46,10 @@
# person = Person.new(name: 'John Doe', birthday: '2001-01-31', foo: :bar)
#
# @example Constructor for attributes withouth strict mode
#
# class Person
-# include Koine::Attributes
-#
# attributes initializer: { strict: false } do
# attribute :name, :string
# attribute :birthday, :date
# end
# end
@@ -64,12 +58,10 @@
# person = Person.new(name: 'John Doe', birthday: '2001-01-31', foo: :bar)
#
# @example Override constructor
#
# class Person
-# include Koine::Attributes
-#
# attr_reader :foo
#
# attributes initializer: true do
# attribute :name, :string
# attribute :birthday, :date
@@ -82,22 +74,9 @@
# end
# end
#
# person = Person.new(name: 'John Doe', birthday: '2001-01-31', foo: :bar)
# person.foo # => :bar
-#
-# @example
-# class Location
-# include Koine::Attributes
-#
-# attributes initializer: { freeze: true } do
-# attribute :lat, :flaot
-# attribute :lon, :flaot
-# end
-# end
-#
-# location = Location.new(lat: 1, lon: 2)
-# new_location = location.with_lon(3)
#
module Koine
module Attributes
module Adapter
autoload :Boolean, 'koine/attributes/adapter/boolean'