Class: Fixjour::Builder
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(klass, options = {}) ⇒ Builder
constructor
A new instance of Builder.
- #name ⇒ Object
Constructor Details
#initialize(klass, options = {}) ⇒ Builder
Returns a new instance of Builder.
5 6 7 |
# File 'lib/fixjour/builder.rb', line 5 def initialize(klass, ={}) @klass, @options = klass, end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
3 4 5 |
# File 'lib/fixjour/builder.rb', line 3 def klass @klass end |
Instance Method Details
#eql?(other) ⇒ Boolean
13 14 15 |
# File 'lib/fixjour/builder.rb', line 13 def eql?(other) @klass == other.klass end |
#hash ⇒ Object
17 18 19 |
# File 'lib/fixjour/builder.rb', line 17 def hash @klass.hash end |
#name ⇒ Object
9 10 11 |
# File 'lib/fixjour/builder.rb', line 9 def name @name ||= (@options[:as] || @klass.name.underscore).to_s.gsub(/\W+/, '_') end |