module FunWith::Configurations::ObjectMethods

Public Instance Methods

install_fwc_config( config = nil, &block ) click to toggle source
# File lib/fun_with/configurations/object_methods.rb, line 4
def install_fwc_config( config = nil, &block )
  extend FunWith::Configurations::Configurable
  self.config = config || FunWith::Configurations::Config.new( &block )
  self.config.fwc_configured_object = self
  self.config
end
install_fwc_config_from_file( file ) click to toggle source
# File lib/fun_with/configurations/object_methods.rb, line 11
def install_fwc_config_from_file( file )
  config = FunWith::Configurations::Config.from_file( file )
  self.install_fwc_config( config )
  self.fwc_configuration_file = file
  self.config
end
install_fwc_config_from_hash( hash ) click to toggle source
# File lib/fun_with/configurations/object_methods.rb, line 18
def install_fwc_config_from_hash( hash )
  config = FunWith::Configurations::Config.from_hash( hash )
  self.install_fwc_config( config )
  self.config
end
install_fwc_config_from_yaml( yaml_string ) click to toggle source
# File lib/fun_with/configurations/object_methods.rb, line 24
def install_fwc_config_from_yaml( yaml_string )
  config = Config.from_yaml( yaml_string )
  self.install_fwc_config( config )
  self.config
end