Class: Keyboard::BaseAction

Inherits:
Object
  • Object
show all
Defined in:
lib/vk_cozy/dev/keyboard/action.rb

Direct Known Subclasses

Callback, Location, OpenLink, Text, VkApps, VkPay

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/vk_cozy/dev/keyboard/action.rb', line 3

def type
  @type
end

Instance Method Details

#get_dataObject



5
6
7
8
9
10
11
12
# File 'lib/vk_cozy/dev/keyboard/action.rb', line 5

def get_data
  instance_variables.each_with_object({}) do |k, h|
    var = instance_variable_get("#{k}")
    if not var.nil?
      h[k.to_s.gsub('@', '')] = var
    end
  end
end