Class: Multiwoven::Integrations::Core::OpenRouterCatalog::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/multiwoven/integrations/core/open_router_catalog.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fetched_atObject

Returns the value of attribute fetched_at

Returns:

  • (Object)

    the current value of fetched_at



15
16
17
# File 'lib/multiwoven/integrations/core/open_router_catalog.rb', line 15

def fetched_at
  @fetched_at
end

#models_by_slugObject

Returns the value of attribute models_by_slug

Returns:

  • (Object)

    the current value of models_by_slug



15
16
17
# File 'lib/multiwoven/integrations/core/open_router_catalog.rb', line 15

def models_by_slug
  @models_by_slug
end

#sourceObject

Returns the value of attribute source

Returns:

  • (Object)

    the current value of source



15
16
17
# File 'lib/multiwoven/integrations/core/open_router_catalog.rb', line 15

def source
  @source
end

Instance Method Details

#models_for(slug) ⇒ Object



16
17
18
19
20
# File 'lib/multiwoven/integrations/core/open_router_catalog.rb', line 16

def models_for(slug)
  return [] if slug.blank?

  models_by_slug.fetch(slug.to_s.downcase, [])
end