### Home Classes Methods

### In Files

- lib/mcollective/data/result.rb

### Parent

Object

### Methods

- ::new
- #[]
- #[]=
- #include?
- #keys
- #method_missing

### Files

- COPYING
- README
- Rakefile
- PLACEHOLDER
- PLACEHOLDER

### Class/Module Index

Quicksearch

- MCollective
- MCollective::Agent
- MCollective::Agents
- MCollective::Aggregate
- MCollective::Aggregate::Base
- MCollective::Aggregate::Result
- MCollective::Aggregate::Result::Base
- MCollective::Aggregate::Result::CollectionResult
- MCollective::Aggregate::Result::NumericResult
- MCollective::Application
- MCollective::Applications
- MCollective::Client
- MCollective::Config
- MCollective::Connector
- MCollective::Connector::Base
- MCollective::DDL
- MCollective::DDLValidationError
- MCollective::Data
- MCollective::Data::Base
- MCollective::Data::Result
- MCollective::Discovery
- MCollective::Facts
- MCollective::Facts::Base
- MCollective::Generators
- MCollective::Generators::AgentGenerator
- MCollective::Generators::Base
- MCollective::Generators::DataGenerator
- MCollective::InvalidRPCData
- MCollective::Log
- MCollective::Logger
- MCollective::Logger::Base
- MCollective::Logger::Console_logger
- MCollective::Logger::File_logger
- MCollective::Logger::Syslog_logger
- MCollective::Matcher
- MCollective::Matcher::Parser
- MCollective::Matcher::Scanner
- MCollective::Message
- MCollective::MissingRPCData
- MCollective::MsgDoesNotMatchRequestID
- MCollective::MsgTTLExpired
- MCollective::NotTargettedAtUs
- MCollective::Optionparser
- MCollective::PluginManager
- MCollective::PluginPackager
- MCollective::PluginPackager::AgentDefinition
- MCollective::PluginPackager::StandardDefinition
- MCollective::RPC
- MCollective::RPC::ActionRunner
- MCollective::RPC::Agent
- MCollective::RPC::Audit
- MCollective::RPC::Client
- MCollective::RPC::Helpers
- MCollective::RPC::Progress
- MCollective::RPC::Reply
- MCollective::RPC::Request
- MCollective::RPC::Result
- MCollective::RPC::Stats
- MCollective::RPCAborted
- MCollective::RPCError
- MCollective::Registration
- MCollective::Registration::Base
- MCollective::Runner
- MCollective::RunnerStats
- MCollective::SSL
- MCollective::Security
- MCollective::Security::Base
- MCollective::SecurityValidationFailed
- MCollective::Shell
- MCollective::UnixDaemon
- MCollective::UnknownRPCAction
- MCollective::UnknownRPCError
- MCollective::Util
- MCollective::WindowsDaemon
- Array
- Dir
- Object
- String
- Symbol

No matching classes.

# MCollective::Data::Result

### Public Instance Methods

[](key) click to toggle source

    # File lib/mcollective/data/result.rb, line 17
    def [](key)
      @data[key.to_sym]
    end

[]=(key, val) click to toggle source

    # File lib/mcollective/data/result.rb, line 21
    def []=(key, val)
      raise "Can only store String, Integer, Float or Boolean data but got #{val.class} for key #{key}" unless [String, Fixnum, Float, TrueClass, FalseClass].include?(val.class)

      @data[key.to_sym] = val
    end

include?(key) click to toggle source

    # File lib/mcollective/data/result.rb, line 13
    def include?(key)
      @data.include?(key.to_sym)
    end

keys() click to toggle source

    # File lib/mcollective/data/result.rb, line 27
    def keys
      @data.keys
    end

method_missing(method, *args) click to toggle source

    # File lib/mcollective/data/result.rb, line 31
    def method_missing(method, *args)
      key = method.to_sym

      raise NameError, "undefined local variable or method `%s'" % key unless include?(key)

      @data[key]
    end

### Public Class Methods

new() click to toggle source

    # File lib/mcollective/data/result.rb, line 9
    def initialize
      @data = {}
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.