Class: SlackBot::Events::Schemas::Type::Base

Inherits:
JsonSchematize::Generator
  • Object
show all
Defined in:
lib/slack_bot/events/schemas/type/base.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args, &block) ⇒ Object



23
24
25
26
27
28
29
# File 'lib/slack_bot/events/schemas/type/base.rb', line 23

def method_missing(m, *args, &block)
  if __raw_params.has_key?(m.to_s)
    return __raw_params[m.to_s]
  end

  super
end

Instance Method Details

#tldrObject



15
16
17
18
19
20
21
# File 'lib/slack_bot/events/schemas/type/base.rb', line 15

def tldr
  if @tldr
    "type: #{type}; #{@tldr}"
  else
    "type: #{type}; unknown;"
  end
end