Sha256: 166c2d8b74b70adb1e1375c517c26eacfc925d835db6b2d2b83190a0012dd1ad
Contents?: true
Size: 666 Bytes
Versions: 9
Compression:
Stored size: 666 Bytes
Contents
module ReportsKit module Reports class Filter attr_accessor :properties def initialize(properties) properties = { key: properties } if properties.is_a?(String) raise ArgumentError.new("Filter properties must be a String or Hash, not a #{properties.class.name}: #{properties.inspect}") unless properties.is_a?(Hash) self.properties = properties.deep_symbolize_keys end def key properties[:key] end def expression properties[:expression] || key end def label key.titleize end def normalized_properties properties end end end end
Version data entries
9 entries across 9 versions & 1 rubygems