Module: GitStats::HashInitializable
- Included in:
- GitData::Author, GitData::Blob, GitData::Commit, GitData::Repo, GitData::Tree
- Defined in:
- lib/git_stats/hash_initializable.rb
Instance Method Summary collapse
Instance Method Details
#initialize(params = {}) ⇒ Object
5 6 7 8 9 |
# File 'lib/git_stats/hash_initializable.rb', line 5 def initialize(params = {}) raise "pass a Hash to initialize #{self.class}" unless params.is_a? Hash params.each { |k, v| instance_variable_set(:"@#{k}", v) } end |