Module: Aws::Lex::Conversation::Type::Enumeration::ClassMethods

Defined in:
lib/aws/lex/conversation/type/enumeration.rb

Instance Method Summary collapse

Instance Method Details

#enumeration(value) ⇒ Object



26
27
28
29
30
31
32
33
34
# File 'lib/aws/lex/conversation/type/enumeration.rb', line 26

def enumeration(value)
  enumerations << value
  snake_case = Support::Inflector.new(value).to_snake_case
  class_eval(
    "def #{snake_case}?; raw.casecmp('#{value}').zero?; end",
    __FILE__,
    __LINE__ - 2
  )
end

#enumerationsObject



36
37
38
# File 'lib/aws/lex/conversation/type/enumeration.rb', line 36

def enumerations
  @enumerations ||= []
end