Class: FilterOption

Inherits:
CheckValues show all
Defined in:
lib/chino_ruby.rb

Overview

——————————SEARCH———————————–#

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from CheckValues

#check_boolean, #check_int, #check_json, #check_string

Constructor Details

#initialize(field, type, value) ⇒ FilterOption

Returns a new instance of FilterOption.



1360
1361
1362
1363
1364
1365
1366
1367
# File 'lib/chino_ruby.rb', line 1360

def initialize(field, type, value)
    check_string(field)
    check_string(type)
    check_json(value)
    self.field = field
    self.type = type
    self.value = value
end

Instance Attribute Details

#fieldObject

Returns the value of attribute field.



1358
1359
1360
# File 'lib/chino_ruby.rb', line 1358

def field
  @field
end

#typeObject

Returns the value of attribute type.



1358
1359
1360
# File 'lib/chino_ruby.rb', line 1358

def type
  @type
end

#valueObject

Returns the value of attribute value.



1358
1359
1360
# File 'lib/chino_ruby.rb', line 1358

def value
  @value
end

Instance Method Details

#to_jsonObject



1369
1370
1371
# File 'lib/chino_ruby.rb', line 1369

def to_json
    {"field": field, "type": type, "value": value}.to_json
end