Module: DNZ::Attributes

Included in:
Result
Defined in:
lib/dnz/attributes.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(symbol, *args) ⇒ Object



7
8
9
10
11
# File 'lib/dnz/attributes.rb', line 7

def method_missing(symbol, *args)
  if args.empty? && @attributes.has_key?(symbol.to_s)
    @attributes[symbol.to_s]
  end
end

Instance Method Details

#idObject



3
4
5
# File 'lib/dnz/attributes.rb', line 3

def id
  @attributes['id']
end