Class: Gantty::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/gantty.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(r) ⇒ Resource

Returns a new instance of Resource.



71
72
73
74
75
76
# File 'lib/gantty.rb', line 71

def initialize r
  @name = r.attributes["name"]
  @phone = r.attributes["phone"]
  @email = r.attributes["contacts"]
  @id = r.attributes["id"].to_i
end

Instance Attribute Details

#emailObject

Returns the value of attribute email.



68
69
70
# File 'lib/gantty.rb', line 68

def email
  @email
end

#idObject (readonly)

Returns the value of attribute id.



69
70
71
# File 'lib/gantty.rb', line 69

def id
  @id
end

#nameObject

Returns the value of attribute name.



68
69
70
# File 'lib/gantty.rb', line 68

def name
  @name
end

#phoneObject

Returns the value of attribute phone.



68
69
70
# File 'lib/gantty.rb', line 68

def phone
  @phone
end