Class: Peregrin::Property
- Inherits:
-
Object
- Object
- Peregrin::Property
- Defined in:
- lib/peregrin/property.rb
Overview
Books have metadata. Each unit of metadata (each metadatum?) is a ‘property’ of the book.
A property has a key, a value and an optional set of attributes.
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#key ⇒ Object
Returns the value of attribute key.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(key, value, attributes = {}) ⇒ Property
constructor
A new instance of Property.
Constructor Details
#initialize(key, value, attributes = {}) ⇒ Property
Returns a new instance of Property.
10 11 12 13 14 |
# File 'lib/peregrin/property.rb', line 10 def initialize(key, value, attributes = {}) @key = key @value = value @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
8 9 10 |
# File 'lib/peregrin/property.rb', line 8 def attributes @attributes end |
#key ⇒ Object
Returns the value of attribute key.
8 9 10 |
# File 'lib/peregrin/property.rb', line 8 def key @key end |
#value ⇒ Object
Returns the value of attribute value.
8 9 10 |
# File 'lib/peregrin/property.rb', line 8 def value @value end |