Sha256: 0f4ead91ab756ab2ad02a6770065331b180cf84be9fe87e625f07359d85d767b

Contents?: true

Size: 270 Bytes

Versions: 15

Compression:

Stored size: 270 Bytes

Contents

module Maestrano

  # Extebd OpenStruct to include a 'attributes'
  # method
  class OpenStruct < ::OpenStruct
    # Return all object defined attributes
    def attributes
      (self.methods - self.class.new.methods).reject {|method| method =~ /=$/ }
    end
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
maestrano-0.12.4 lib/maestrano/open_struct.rb
maestrano-0.12.3 lib/maestrano/open_struct.rb
maestrano-0.12.2 lib/maestrano/open_struct.rb
maestrano-0.12.1 lib/maestrano/open_struct.rb
maestrano-0.12.0 lib/maestrano/open_struct.rb
maestrano-0.11.0 lib/maestrano/open_struct.rb
maestrano-0.10.0 lib/maestrano/open_struct.rb
maestrano-0.9.2 lib/maestrano/open_struct.rb
maestrano-0.9.1 lib/maestrano/open_struct.rb
maestrano-0.9.0 lib/maestrano/open_struct.rb
maestrano-ruby-test-0.8.3 lib/maestrano/open_struct.rb
maestrano-0.8.2 lib/maestrano/open_struct.rb
maestrano-0.8.1 lib/maestrano/open_struct.rb
maestrano-0.8.0 lib/maestrano/open_struct.rb
maestrano-0.7.0 lib/maestrano/open_struct.rb