Class: Moogle::Requests::CreateTarget

Inherits:
Object
  • Object
show all
Includes:
Aequitas, Serf::Message, Serf::More::UuidFields, Virtus
Defined in:
lib/moogle/requests/create_target.rb

Constant Summary collapse

TYPES =
[
  'blog',
  'email',
  'facebook',
  'twitter',
  'webhook'
]

Instance Method Summary collapse

Instance Method Details

#has_valid_type?Boolean

Returns:

  • (Boolean)


30
31
32
33
34
35
36
# File 'lib/moogle/requests/create_target.rb', line 30

def has_valid_type?
  if TYPES.include? type
    return true, 'Valid'
  else
    return false, "'#{type}' is invalid type. Must be in #{TYPES}"
  end
end