Class: CouchFoo::Property
- Inherits:
-
Object
- Object
- CouchFoo::Property
- Defined in:
- lib/couch_foo/base.rb
Overview
Simple class encapsulating a property
Instance Attribute Summary collapse
-
#default ⇒ Object
Returns the value of attribute default.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name, type, default = nil, *args) ⇒ Property
constructor
A new instance of Property.
Constructor Details
#initialize(name, type, default = nil, *args) ⇒ Property
Returns a new instance of Property.
44 45 46 47 48 |
# File 'lib/couch_foo/base.rb', line 44 def initialize(name, type, default = nil, *args) self.name = name self.type = type self.default = default end |
Instance Attribute Details
#default ⇒ Object
Returns the value of attribute default.
43 44 45 |
# File 'lib/couch_foo/base.rb', line 43 def default @default end |
#name ⇒ Object
Returns the value of attribute name.
43 44 45 |
# File 'lib/couch_foo/base.rb', line 43 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
43 44 45 |
# File 'lib/couch_foo/base.rb', line 43 def type @type end |