lib/linodians/group.rb in linodians-0.0.4 vs lib/linodians/group.rb in linodians-0.0.5

- old
+ new

@@ -6,12 +6,16 @@ class Group < Delegator attr_reader :members alias_method :__getobj__, :members def initialize(data = nil) - @members = data || Linodians.download_data + @members = Linodians.load_data(data) @members.freeze super(@members) + end + + def lookup(username) + find { |x| x.username == username } end def __setobj__(_) @members end