Method: Attributes#method_missing
- Defined in:
- lib/filebase/attributes.rb
#method_missing(name, *args) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/filebase/attributes.rb', line 12 def method_missing(name,*args) case args.length when 0 then get( name.to_s ) when 1 then set( name.to_s[0..-2], args[0] ) else raise ArgumentError.new("#{args.length} for 0 or 1") end end |