Class: TicketAbstractorClient::Jira::FieldsMeta
- Inherits:
-
Hash
- Object
- Hash
- TicketAbstractorClient::Jira::FieldsMeta
- Defined in:
- lib/ticket_abstractor_client/jira/fields_meta.rb
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
- #expired? ⇒ Boolean
-
#initialize(endpoint) ⇒ FieldsMeta
constructor
A new instance of FieldsMeta.
- #update! ⇒ Object
Constructor Details
#initialize(endpoint) ⇒ FieldsMeta
Returns a new instance of FieldsMeta.
7 8 9 10 11 |
# File 'lib/ticket_abstractor_client/jira/fields_meta.rb', line 7 def initialize(endpoint) super() @endpoint = endpoint update! end |
Instance Attribute Details
#endpoint ⇒ Object
Returns the value of attribute endpoint.
4 5 6 |
# File 'lib/ticket_abstractor_client/jira/fields_meta.rb', line 4 def endpoint @endpoint end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
5 6 7 |
# File 'lib/ticket_abstractor_client/jira/fields_meta.rb', line 5 def updated_at @updated_at end |
Instance Method Details
#expired? ⇒ Boolean
18 19 20 21 |
# File 'lib/ticket_abstractor_client/jira/fields_meta.rb', line 18 def expired? expiration_period = TicketAbstractorClient.configuration. (Time.now.to_i - @updated_at) > expiration_period end |
#update! ⇒ Object
13 14 15 16 |
# File 'lib/ticket_abstractor_client/jira/fields_meta.rb', line 13 def update! update(@meta_data) end |