Class: Recurly::Schema::ArrayAttribute

Inherits:
Attribute
  • Object
show all
Defined in:
lib/recurly/schema.rb

Constant Summary

Constants inherited from Attribute

Recurly::Schema::Attribute::PRIMITIVE_TYPES

Instance Attribute Summary

Attributes inherited from Attribute

#type

Instance Method Summary collapse

Methods inherited from Attribute

build, #initialize, #recurly_class

Constructor Details

This class inherits a constructor from Recurly::Schema::Attribute

Instance Method Details

#cast(value) ⇒ Object



144
145
146
147
148
# File 'lib/recurly/schema.rb', line 144

def cast(value)
  value.map do |v|
    self.type.cast(v)
  end
end

#is_valid?(value) ⇒ Boolean

Returns:

  • (Boolean)


140
141
142
# File 'lib/recurly/schema.rb', line 140

def is_valid?(value)
  value.is_a? Array
end