Class: Kahuna::Member

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

Constant Summary collapse

REGEX =
/^([\w\.\-]+)\s+([\w\.\-]+)(?:\s+([\w\.\-]+))?$/

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Member

Returns a new instance of Member.



8
9
10
11
# File 'lib/kahuna/member.rb', line 8

def initialize(data)
  @raw_data = data
  @name, @address, @role = process_data
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



5
6
7
# File 'lib/kahuna/member.rb', line 5

def address
  @address
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/kahuna/member.rb', line 5

def name
  @name
end

#raw_dataObject (readonly)

Returns the value of attribute raw_data.



5
6
7
# File 'lib/kahuna/member.rb', line 5

def raw_data
  @raw_data
end

#roleObject (readonly)

Returns the value of attribute role.



5
6
7
# File 'lib/kahuna/member.rb', line 5

def role
  @role
end