Class: Set

Inherits:
Object show all
Defined in:
lib/ripple/core_ext/casting.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.ripple_cast(value) ⇒ Object



146
147
148
149
# File 'lib/ripple/core_ext/casting.rb', line 146

def self.ripple_cast(value)
  return nil if value.nil?
  value.is_a?(Enumerable) && new(value) or raise Ripple::PropertyTypeMismatch.new(self, value)
end

Instance Method Details

#as_json(options = {}) ⇒ Object



142
143
144
# File 'lib/ripple/core_ext/casting.rb', line 142

def as_json(options = {})
  map { |e| e.as_json(options) }
end