Module: Pipeline::SymbolAttribute::ClassMethods
- Defined in:
- lib/pipeline/core_ext/symbol_attribute.rb
Overview
:nodoc:
Instance Method Summary collapse
- #symbol_attrs(*attributes) ⇒ Object (also: #symbol_attr)
Instance Method Details
#symbol_attrs(*attributes) ⇒ Object Also known as: symbol_attr
22 23 24 25 26 27 28 29 30 |
# File 'lib/pipeline/core_ext/symbol_attribute.rb', line 22 def symbol_attrs(*attributes) attributes.each do |attribute| class_eval " def \#{attribute.to_s}\n read_attribute('\#{attribute.to_s}').to_sym rescue nil\n end\n EOD\n end\nend\n" |