Class: TableauRestApi::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/tableau_rest_api/resources/base.rb

Instance Method Summary collapse

Instance Method Details

#to_arrayObject



11
12
13
14
15
# File 'lib/tableau_rest_api/resources/base.rb', line 11

def to_array
  filter_instance_variables.map do |var|
    [Helpers::camel_case_lower(var[1..-1]).to_sym, self.instance_variable_get(var)]
  end
end

#to_hObject



7
8
9
# File 'lib/tableau_rest_api/resources/base.rb', line 7

def to_h
  self.to_hash
end

#to_hashObject



3
4
5
# File 'lib/tableau_rest_api/resources/base.rb', line 3

def to_hash
  self.to_array.to_h
end