Class: Megalith::Author
- Inherits:
-
Object
- Object
- Megalith::Author
- Defined in:
- lib/megalith/scheme.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Returns the value of attribute author.
Instance Method Summary collapse
-
#initialize(author) ⇒ Author
constructor
A new instance of Author.
- #method_missing(action, *args) ⇒ Object
- #params ⇒ Object (also: #available_methods)
- #to_hash ⇒ Object
Constructor Details
#initialize(author) ⇒ Author
Returns a new instance of Author.
152 153 154 |
# File 'lib/megalith/scheme.rb', line 152 def initialize() @author = end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(action, *args) ⇒ Object
156 157 158 |
# File 'lib/megalith/scheme.rb', line 156 def method_missing(action, *args) return @author[action.to_s.to_sym] rescue nil end |
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
150 151 152 |
# File 'lib/megalith/scheme.rb', line 150 def @author end |
Instance Method Details
#params ⇒ Object Also known as: available_methods
160 |
# File 'lib/megalith/scheme.rb', line 160 def params() @author.keys.map{|k|k.to_sym} ; end |
#to_hash ⇒ Object
163 164 165 |
# File 'lib/megalith/scheme.rb', line 163 def to_hash @author end |