class TableauRestApi::Base

Public Instance Methods

to_array() click to toggle source
# 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_h() click to toggle source
# File lib/tableau_rest_api/resources/base.rb, line 7
def to_h
  self.to_hash
end
to_hash() click to toggle source
# File lib/tableau_rest_api/resources/base.rb, line 3
def to_hash
  self.to_array.to_h
end

Private Instance Methods

filter_instance_variables() click to toggle source
# File lib/tableau_rest_api/resources/base.rb, line 19
def filter_instance_variables
  self.instance_variables.select { |var| var != :@called_by }
end