Class: Arcp::Session::ListJobs

Inherits:
Data
  • Object
show all
Defined in:
lib/arcp/session/list_jobs.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cursorObject (readonly)

Returns the value of attribute cursor

Returns:

  • (Object)

    the current value of cursor



5
6
7
# File 'lib/arcp/session/list_jobs.rb', line 5

def cursor
  @cursor
end

#filterObject (readonly)

Returns the value of attribute filter

Returns:

  • (Object)

    the current value of filter



5
6
7
# File 'lib/arcp/session/list_jobs.rb', line 5

def filter
  @filter
end

#limitObject (readonly)

Returns the value of attribute limit

Returns:

  • (Object)

    the current value of limit



5
6
7
# File 'lib/arcp/session/list_jobs.rb', line 5

def limit
  @limit
end

Class Method Details

.from_h(h) ⇒ Object



6
7
8
9
# File 'lib/arcp/session/list_jobs.rb', line 6

def self.from_h(h)
  h = h.transform_keys(&:to_s)
  new(filter: h['filter'] || {}, limit: h['limit'], cursor: h['cursor'])
end

Instance Method Details

#to_hObject



11
12
13
14
15
16
# File 'lib/arcp/session/list_jobs.rb', line 11

def to_h
  out = { 'filter' => filter || {} }
  out['limit'] = limit if limit
  out['cursor'] = cursor if cursor
  out
end