Class: AccessGrid::Card
- Inherits:
-
Object
- Object
- AccessGrid::Card
- Defined in:
- lib/accessgrid/access_cards.rb
Instance Attribute Summary collapse
-
#expiration_date ⇒ Object
readonly
Returns the value of attribute expiration_date.
-
#full_name ⇒ Object
readonly
Returns the value of attribute full_name.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(data) ⇒ Card
constructor
A new instance of Card.
Constructor Details
#initialize(data) ⇒ Card
Returns a new instance of Card.
44 45 46 47 48 49 50 |
# File 'lib/accessgrid/access_cards.rb', line 44 def initialize(data) @id = data['id'] @state = data['state'] @url = data['install_url'] @full_name = data['full_name'] @expiration_date = data['expiration_date'] end |
Instance Attribute Details
#expiration_date ⇒ Object (readonly)
Returns the value of attribute expiration_date.
42 43 44 |
# File 'lib/accessgrid/access_cards.rb', line 42 def expiration_date @expiration_date end |
#full_name ⇒ Object (readonly)
Returns the value of attribute full_name.
42 43 44 |
# File 'lib/accessgrid/access_cards.rb', line 42 def full_name @full_name end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
42 43 44 |
# File 'lib/accessgrid/access_cards.rb', line 42 def id @id end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
42 43 44 |
# File 'lib/accessgrid/access_cards.rb', line 42 def state @state end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
42 43 44 |
# File 'lib/accessgrid/access_cards.rb', line 42 def url @url end |