Module: Simplecast::Configurable

Included in:
Simplecast, Client, Simplecast::Client::Resource
Defined in:
lib/simplecast/configurable.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



3
4
5
# File 'lib/simplecast/configurable.rb', line 3

def api_key
  @api_key
end

#podcast_idObject

Returns the value of attribute podcast_id.



3
4
5
# File 'lib/simplecast/configurable.rb', line 3

def podcast_id
  @podcast_id
end

Class Method Details

.keysObject



5
6
7
8
9
10
# File 'lib/simplecast/configurable.rb', line 5

def keys
  @keys ||= [
    :api_key,
    :podcast_id
  ]
end

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



12
13
14
# File 'lib/simplecast/configurable.rb', line 12

def configure
  yield self
end

#optionsObject



15
16
17
# File 'lib/simplecast/configurable.rb', line 15

def options
  Hash[Simplecast::Configurable.keys.map{|key| [key, instance_variable_get(:"@#{key}")]}]
end