Class: ChinoRuby::FilterOption

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

Overview

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

Direct Known Subclasses

ChinoFilterOption

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.



1304
1305
1306
1307
1308
1309
1310
1311
# File 'lib/chino_ruby/classes.rb', line 1304

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.



1302
1303
1304
# File 'lib/chino_ruby/classes.rb', line 1302

def field
  @field
end

#typeObject

Returns the value of attribute type.



1302
1303
1304
# File 'lib/chino_ruby/classes.rb', line 1302

def type
  @type
end

#valueObject

Returns the value of attribute value.



1302
1303
1304
# File 'lib/chino_ruby/classes.rb', line 1302

def value
  @value
end

Instance Method Details

#to_jsonObject



1313
1314
1315
# File 'lib/chino_ruby/classes.rb', line 1313

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