Class: Cadenya::Models::Agents::ScheduleRange

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/cadenya/models/agents/schedule_range.rb,
sig/cadenya/models/agents/schedule_range.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(end_: nil, start: nil, step: nil) ⇒ Object

Inclusive numeric range with optional step. 9 → 9 9, end: 17 → 9..17 0, end: 59, step: 15 → 0,15,30,45 end defaults to start; step defaults to 1.

Parameters:

  • end_ (Integer) (defaults to: nil)
  • start (Integer) (defaults to: nil)
  • step (Integer) (defaults to: nil)


# File 'lib/cadenya/models/agents/schedule_range.rb', line 22

Instance Attribute Details

#end_Integer?

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


10
# File 'lib/cadenya/models/agents/schedule_range.rb', line 10

optional :end_, Integer, api_name: :end

#startInteger?

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


15
# File 'lib/cadenya/models/agents/schedule_range.rb', line 15

optional :start, Integer

#stepInteger?

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


20
# File 'lib/cadenya/models/agents/schedule_range.rb', line 20

optional :step, Integer

Instance Method Details

#to_hash{ end_: Integer, start: Integer, step: Integer }

Returns:

  • ({ end_: Integer, start: Integer, step: Integer })


25
# File 'sig/cadenya/models/agents/schedule_range.rbs', line 25

def to_hash: -> { end_: Integer, start: Integer, step: Integer }