Class: Cadenya::Types::ToolSetAdapter_StringMatcher_StartsWith

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, starts_with: nil, case_sensitive: nil) ⇒ ToolSetAdapter_StringMatcher_StartsWith

Returns a new instance of ToolSetAdapter_StringMatcher_StartsWith.



8065
8066
8067
8068
8069
# File 'lib/cadenya/types.rb', line 8065

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

Instance Attribute Details

#case_sensitiveObject (readonly)

Returns the value of attribute case_sensitive.



8063
8064
8065
# File 'lib/cadenya/types.rb', line 8063

def case_sensitive
  @case_sensitive
end

#starts_withObject (readonly)

Returns the value of attribute starts_with.



8063
8064
8065
# File 'lib/cadenya/types.rb', line 8063

def starts_with
  @starts_with
end

#typeObject (readonly)

Returns the value of attribute type.



8063
8064
8065
# File 'lib/cadenya/types.rb', line 8063

def type
  @type
end

Class Method Details

.from_json(data) ⇒ Object



8071
8072
8073
8074
8075
8076
8077
# File 'lib/cadenya/types.rb', line 8071

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

Instance Method Details

#to_hObject



8079
8080
8081
8082
8083
8084
8085
# File 'lib/cadenya/types.rb', line 8079

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