Class: Smile::Base

Inherits:
Object
  • Object
show all
Extended by:
Common
Includes:
Common
Defined in:
lib/smile/base.rb

Direct Known Subclasses

Album, Photo, Smug

Constant Summary

Constant Summary

Constants included from Common

Common::BASE, Common::BASE_SECURE, Common::UPLOAD, Common::VERSION

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods included from Common

base_web_method_call, default_params, logger, logger_on?, secure_web_method_call, session, upper_hash_to_lower_hash, web_method_call

Constructor Details

- (Base) initialize(options = {})



24
25
26
# File 'lib/smile/base.rb', line 24

def initialize( options={} )
  @attributes = OpenStruct.new( options )
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

- (Object) method_missing(name, *args)



28
29
30
# File 'lib/smile/base.rb', line 28

def method_missing( name, *args )
  @attributes.send(name,*args)
end

Instance Attribute Details

- (Object) attributes

Returns the value of attribute attributes



10
11
12
# File 'lib/smile/base.rb', line 10

def attributes
  @attributes
end

Class Method Details

+ (Object) clear_config!



19
20
21
# File 'lib/smile/base.rb', line 19

def clear_config!
  session.clear_config!
end

+ (Object) configure {|session| ... }

Yields:

  • (session)


15
16
17
# File 'lib/smile/base.rb', line 15

def configure
  yield( session )
end