Module: Para::Component::Exportable
Instance Method Summary collapse
- #exportable? ⇒ Boolean
-
#exports ⇒ Object
TODO : Move :configuration column store to JSON instead of HStore which handles more data types and will help us avoid eval here.
Instance Method Details
#exportable? ⇒ Boolean
10 11 12 |
# File 'lib/para/component/exportable.rb', line 10 def exportable? @exportable ||= exports.length > 0 end |
#exports ⇒ Object
TODO : Move :configuration column store to JSON instead of HStore which handles more data types and will help us avoid eval here
16 17 18 19 20 21 22 |
# File 'lib/para/component/exportable.rb', line 16 def exports @exports ||= if export.present? eval(export).map(&:with_indifferent_access) else [] end end |