Class: MOCO::Activity
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- MOCO::Activity
- Defined in:
- lib/moco/entities.rb
Overview
Instance Attribute Summary collapse
-
#active ⇒ Object
Returns the value of attribute active.
-
#billable ⇒ Object
Returns the value of attribute billable.
-
#billed ⇒ Object
Returns the value of attribute billed.
-
#customer ⇒ Object
Returns the value of attribute customer.
-
#date ⇒ Object
Returns the value of attribute date.
-
#description ⇒ Object
Returns the value of attribute description.
-
#hours ⇒ Object
Returns the value of attribute hours.
-
#id ⇒ Object
Returns the value of attribute id.
-
#project ⇒ Object
Returns the value of attribute project.
-
#seconds ⇒ Object
Returns the value of attribute seconds.
-
#tag ⇒ Object
Returns the value of attribute tag.
-
#task ⇒ Object
Returns the value of attribute task.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
Methods inherited from BaseEntity
#==, #eql?, #hash, #to_h, #to_json
Instance Attribute Details
#active ⇒ Object
Returns the value of attribute active.
66 67 68 |
# File 'lib/moco/entities.rb', line 66 def active @active end |
#billable ⇒ Object
Returns the value of attribute billable.
66 67 68 |
# File 'lib/moco/entities.rb', line 66 def billable @billable end |
#billed ⇒ Object
Returns the value of attribute billed.
66 67 68 |
# File 'lib/moco/entities.rb', line 66 def billed @billed end |
#customer ⇒ Object
Returns the value of attribute customer.
66 67 68 |
# File 'lib/moco/entities.rb', line 66 def customer @customer end |
#date ⇒ Object
Returns the value of attribute date.
66 67 68 |
# File 'lib/moco/entities.rb', line 66 def date @date end |
#description ⇒ Object
Returns the value of attribute description.
66 67 68 |
# File 'lib/moco/entities.rb', line 66 def description @description end |
#hours ⇒ Object
Returns the value of attribute hours.
66 67 68 |
# File 'lib/moco/entities.rb', line 66 def hours @hours end |
#id ⇒ Object
Returns the value of attribute id.
66 67 68 |
# File 'lib/moco/entities.rb', line 66 def id @id end |
#project ⇒ Object
Returns the value of attribute project.
66 67 68 |
# File 'lib/moco/entities.rb', line 66 def project @project end |
#seconds ⇒ Object
Returns the value of attribute seconds.
66 67 68 |
# File 'lib/moco/entities.rb', line 66 def seconds @seconds end |
#tag ⇒ Object
Returns the value of attribute tag.
66 67 68 |
# File 'lib/moco/entities.rb', line 66 def tag @tag end |
#task ⇒ Object
Returns the value of attribute task.
66 67 68 |
# File 'lib/moco/entities.rb', line 66 def task @task end |
#user ⇒ Object
Returns the value of attribute user.
66 67 68 |
# File 'lib/moco/entities.rb', line 66 def user @user end |
Instance Method Details
#to_s ⇒ Object
69 70 71 72 |
# File 'lib/moco/entities.rb', line 69 def to_s "#{date} - #{hours}h (#{seconds}s) - #{project&.name} - #{task&.name}#{description.empty? ? "" : " (#{description})"} " \ "(#{%i[billable billed].map { |x| (send(x) ? "" : "not ") + x.to_s }.join(", ")})" end |