Class: Scriptura::Testament

Inherits:
Object
  • Object
show all
Defined in:
lib/scriptura/testament.rb

Constant Summary collapse

DATA =
%w(Old New)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Testament

Returns a new instance of Testament.



7
8
9
10
# File 'lib/scriptura/testament.rb', line 7

def initialize(name)
  fail ArgumentError unless DATA.include?(name)
  @name = name.capitalize
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/scriptura/testament.rb', line 5

def name
  @name
end

Instance Method Details

#string_idObject



12
13
14
# File 'lib/scriptura/testament.rb', line 12

def string_id
  name.downcase
end