Class: XeroRuby::Where

Inherits:
Object
  • Object
show all
Includes:
StringSerialization
Defined in:
lib/xero-ruby/where.rb

Constant Summary collapse

UUID_REGEXP =
/\A[0-9a-f]{8}\b-[0-9a-f]{4}\b-[0-9a-f]{4}\b-[0-9a-f]{4}\b-[0-9a-f]{12}\Z/i
STRING_FUNCTIONS =
%w(Contains StartsWith EndsWith)

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from StringSerialization

#camelize, #camelize_key, #capitalize_first, #gsubbed, #to_camel_keys

Constructor Details

#initialize(where_opts) ⇒ Where

Returns a new instance of Where.



10
11
12
# File 'lib/xero-ruby/where.rb', line 10

def initialize(where_opts)
  @where_opts = where_opts
end

Instance Attribute Details

#where_optsObject (readonly)

Returns the value of attribute where_opts.



8
9
10
# File 'lib/xero-ruby/where.rb', line 8

def where_opts
  @where_opts
end

Instance Method Details

#to_paramObject



14
15
16
# File 'lib/xero-ruby/where.rb', line 14

def to_param
  where_opts.map { |key, value| parameterize_option(key, value) }.join(' AND ')
end