Class: RepoTender::State::Store::Org

Inherits:
Data
  • Object
show all
Defined in:
lib/repo_tender/state/store.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(last_listed_at: nil, repo_count: 0, last_error: nil) ⇒ Org

Returns a new instance of Org.



42
43
44
# File 'lib/repo_tender/state/store.rb', line 42

def initialize(last_listed_at: nil, repo_count: 0, last_error: nil)
  super
end

Instance Attribute Details

#last_errorObject (readonly)

Returns the value of attribute last_error

Returns:

  • (Object)

    the current value of last_error



41
42
43
# File 'lib/repo_tender/state/store.rb', line 41

def last_error
  @last_error
end

#last_listed_atObject (readonly)

Returns the value of attribute last_listed_at

Returns:

  • (Object)

    the current value of last_listed_at



41
42
43
# File 'lib/repo_tender/state/store.rb', line 41

def last_listed_at
  @last_listed_at
end

#repo_countObject (readonly)

Returns the value of attribute repo_count

Returns:

  • (Object)

    the current value of repo_count



41
42
43
# File 'lib/repo_tender/state/store.rb', line 41

def repo_count
  @repo_count
end

Instance Method Details

#to_h_compactObject



46
47
48
49
50
51
52
# File 'lib/repo_tender/state/store.rb', line 46

def to_h_compact
  {
    "last_listed_at" => format_time(last_listed_at),
    "repo_count" => repo_count,
    "last_error" => last_error
  }.compact
end