Class: Cadenya::Types::ToolSetAdapter_StringMatcher_EndsWith

Inherits:
Object
  • Object
show all
Defined in:
lib/cadenya/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type: nil, ends_with: nil, case_sensitive: nil) ⇒ ToolSetAdapter_StringMatcher_EndsWith

Returns a new instance of ToolSetAdapter_StringMatcher_EndsWith.



8091
8092
8093
8094
8095
# File 'lib/cadenya/types.rb', line 8091

def initialize(type: nil, ends_with: nil, case_sensitive: nil)
  @type = type
  @ends_with = ends_with
  @case_sensitive = case_sensitive
end

Instance Attribute Details

#case_sensitiveObject (readonly)

Returns the value of attribute case_sensitive.



8089
8090
8091
# File 'lib/cadenya/types.rb', line 8089

def case_sensitive
  @case_sensitive
end

#ends_withObject (readonly)

Returns the value of attribute ends_with.



8089
8090
8091
# File 'lib/cadenya/types.rb', line 8089

def ends_with
  @ends_with
end

#typeObject (readonly)

Returns the value of attribute type.



8089
8090
8091
# File 'lib/cadenya/types.rb', line 8089

def type
  @type
end

Class Method Details

.from_json(data) ⇒ Object



8097
8098
8099
8100
8101
8102
8103
# File 'lib/cadenya/types.rb', line 8097

def self.from_json(data)
  new(
    type: data["type"],
    ends_with: data["endsWith"],
    case_sensitive: data["caseSensitive"],
  )
end

Instance Method Details

#to_hObject



8105
8106
8107
8108
8109
8110
8111
# File 'lib/cadenya/types.rb', line 8105

def to_h
  {
    type: Util.plain(@type),
    ends_with: Util.plain(@ends_with),
    case_sensitive: Util.plain(@case_sensitive),
  }.reject { |_k, v| v.nil? }
end