Class: Flexibee::Company
- Inherits:
-
Object
- Object
- Flexibee::Company
- Defined in:
- lib/flexibee/company.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
getting custom info from company response.
-
#db_name ⇒ Object
getting custom info from company response.
-
#id ⇒ Object
getting custom info from company response.
-
#info ⇒ Object
getting custom info from company response.
-
#name ⇒ Object
getting custom info from company response.
Instance Method Summary collapse
-
#initialize(response) ⇒ Company
constructor
A new instance of Company.
Constructor Details
#initialize(response) ⇒ Company
Returns a new instance of Company.
23 24 25 26 27 28 29 |
# File 'lib/flexibee/company.rb', line 23 def initialize(response) @info = response['companies']['company'] @id = response['companies']['company']['id'] @name = response['companies']['company']['nazev'] @db_name = response['companies']['company']['dbNazev'] @created_at = response['companies']['company']['createDt'] end |
Instance Attribute Details
#created_at ⇒ Object
getting custom info from company response
{
"companies" => {
"company" => {
"createDt" => "2015-10-17T18:26:39.692+02:00",
"dbNazev" => "esperia_test",
"id" => "1",
"licenseGroup" => "04fc91491a9647d451649736ad8127e2",
"nazev" => "esperia-test",
"show" => "true",
"stavEnum" => "ESTABLISHED",
"watchingChanges" => "false"
}
}
}
21 22 23 |
# File 'lib/flexibee/company.rb', line 21 def created_at @created_at end |
#db_name ⇒ Object
getting custom info from company response
{
"companies" => {
"company" => {
"createDt" => "2015-10-17T18:26:39.692+02:00",
"dbNazev" => "esperia_test",
"id" => "1",
"licenseGroup" => "04fc91491a9647d451649736ad8127e2",
"nazev" => "esperia-test",
"show" => "true",
"stavEnum" => "ESTABLISHED",
"watchingChanges" => "false"
}
}
}
21 22 23 |
# File 'lib/flexibee/company.rb', line 21 def db_name @db_name end |
#id ⇒ Object
getting custom info from company response
{
"companies" => {
"company" => {
"createDt" => "2015-10-17T18:26:39.692+02:00",
"dbNazev" => "esperia_test",
"id" => "1",
"licenseGroup" => "04fc91491a9647d451649736ad8127e2",
"nazev" => "esperia-test",
"show" => "true",
"stavEnum" => "ESTABLISHED",
"watchingChanges" => "false"
}
}
}
21 22 23 |
# File 'lib/flexibee/company.rb', line 21 def id @id end |
#info ⇒ Object
getting custom info from company response
{
"companies" => {
"company" => {
"createDt" => "2015-10-17T18:26:39.692+02:00",
"dbNazev" => "esperia_test",
"id" => "1",
"licenseGroup" => "04fc91491a9647d451649736ad8127e2",
"nazev" => "esperia-test",
"show" => "true",
"stavEnum" => "ESTABLISHED",
"watchingChanges" => "false"
}
}
}
21 22 23 |
# File 'lib/flexibee/company.rb', line 21 def info @info end |
#name ⇒ Object
getting custom info from company response
{
"companies" => {
"company" => {
"createDt" => "2015-10-17T18:26:39.692+02:00",
"dbNazev" => "esperia_test",
"id" => "1",
"licenseGroup" => "04fc91491a9647d451649736ad8127e2",
"nazev" => "esperia-test",
"show" => "true",
"stavEnum" => "ESTABLISHED",
"watchingChanges" => "false"
}
}
}
21 22 23 |
# File 'lib/flexibee/company.rb', line 21 def name @name end |