Class: Relish::Release
- Inherits:
-
Object
- Object
- Relish::Release
- Defined in:
- lib/relish/release.rb
Instance Attribute Summary collapse
-
#item ⇒ Object
Returns the value of attribute item.
Class Method Summary collapse
Instance Attribute Details
#item ⇒ Object
Returns the value of attribute item.
4 5 6 |
# File 'lib/relish/release.rb', line 4 def item @item end |
Class Method Details
.schema(attrs) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/relish/release.rb', line 6 def self.schema(attrs) attrs.each do |attr, type| class_eval "def #{attr}; @item['#{attr}']['#{type}'] if @item.key? '#{attr}' end", __FILE__, __LINE__ class_eval "def #{attr}= value; @item['#{attr}'] = {'#{type}' => value} end", __FILE__, __LINE__ end end |