Class: CouchFoo::Property

Inherits:
Object
  • Object
show all
Defined in:
lib/couch_foo/base.rb

Overview

Simple class encapsulating a property

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#defaultObject

Returns the value of attribute default.



43
44
45
# File 'lib/couch_foo/base.rb', line 43

def default
  @default
end

#nameObject

Returns the value of attribute name.



43
44
45
# File 'lib/couch_foo/base.rb', line 43

def name
  @name
end

#typeObject

Returns the value of attribute type.



43
44
45
# File 'lib/couch_foo/base.rb', line 43

def type
  @type
end