Class: AssemblyWales::Speech

Inherits:
Object
  • Object
show all
Defined in:
lib/assembly_wales/speech.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content) ⇒ Speech

Returns a new instance of Speech.



5
6
7
# File 'lib/assembly_wales/speech.rb', line 5

def initialize(content)
  @content = content
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/assembly_wales/speech.rb', line 9

def method_missing(name, *args, &block)
  if content.has_key?(name.to_s)
    content[name.to_s]
  else
    super
  end
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



3
4
5
# File 'lib/assembly_wales/speech.rb', line 3

def content
  @content
end