Class: HashOut::ObjectWrapper

Inherits:
Struct
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/hash_out/object_wrapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#objectObject

Returns the value of attribute object

Returns:

  • (Object)

    the current value of object



5
6
7
# File 'lib/hash_out/object_wrapper.rb', line 5

def object
  @object
end

Instance Method Details

#excludableObject



10
11
12
# File 'lib/hash_out/object_wrapper.rb', line 10

def excludable
  @excludable ||= dup.extend Excludable
end

#method_value_pair(method) ⇒ Object



18
19
20
# File 'lib/hash_out/object_wrapper.rb', line 18

def method_value_pair method
  [method, send(method)]
end

#public_methods_requiring_no_argsObject



14
15
16
# File 'lib/hash_out/object_wrapper.rb', line 14

def public_methods_requiring_no_args
  public_methods(false).select { |method| requires_no_args? method }
end