Module: Modesty::IdentityMethods
- Included in:
- API
- Defined in:
- lib/modesty/identity.rb
Instance Attribute Summary collapse
-
#identity ⇒ Object
readonly
Returns the value of attribute identity.
Instance Method Summary collapse
Instance Attribute Details
#identity ⇒ Object (readonly)
Returns the value of attribute identity.
7 8 9 |
# File 'lib/modesty/identity.rb', line 7 def identity @identity end |
Instance Method Details
#identify!(id, opts = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/modesty/identity.rb', line 9 def identify!(id, opts={}) unless opts[:ignore] raise( IdentityError, "Identity must be an integer or nil." ) unless id.nil? || id.is_a?(Fixnum) @identity = id end end |