Class: Scim::Kit::V2::Meta
- Inherits:
-
Object
- Object
- Scim::Kit::V2::Meta
- Includes:
- Templatable
- Defined in:
- lib/scim/kit/v2/meta.rb
Overview
Represents a meta section
Instance Attribute Summary collapse
-
#created ⇒ Object
Returns the value of attribute created.
-
#last_modified ⇒ Object
Returns the value of attribute last_modified.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#resource_type ⇒ Object
readonly
Returns the value of attribute resource_type.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
- #disable_timestamps ⇒ Object
-
#initialize(resource_type, location) ⇒ Meta
constructor
A new instance of Meta.
Methods included from Templatable
#as_json, #render, #template_name, #to_h, #to_json
Constructor Details
#initialize(resource_type, location) ⇒ Meta
Returns a new instance of Meta.
14 15 16 17 18 19 |
# File 'lib/scim/kit/v2/meta.rb', line 14 def initialize(resource_type, location) @resource_type = resource_type || 'Unknown' @location = location @created = @last_modified = Time.now @version = @created.to_i end |
Instance Attribute Details
#created ⇒ Object
Returns the value of attribute created.
10 11 12 |
# File 'lib/scim/kit/v2/meta.rb', line 10 def created @created end |
#last_modified ⇒ Object
Returns the value of attribute last_modified.
10 11 12 |
# File 'lib/scim/kit/v2/meta.rb', line 10 def last_modified @last_modified end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
11 12 13 |
# File 'lib/scim/kit/v2/meta.rb', line 11 def location @location end |
#resource_type ⇒ Object (readonly)
Returns the value of attribute resource_type.
12 13 14 |
# File 'lib/scim/kit/v2/meta.rb', line 12 def resource_type @resource_type end |
#version ⇒ Object
Returns the value of attribute version.
10 11 12 |
# File 'lib/scim/kit/v2/meta.rb', line 10 def version @version end |
Instance Method Details
#disable_timestamps ⇒ Object
21 22 23 |
# File 'lib/scim/kit/v2/meta.rb', line 21 def @version = @created = @last_modified = nil end |