Class: CKick::CompilerFlag
- Inherits:
-
Object
- Object
- CKick::CompilerFlag
- Defined in:
- lib/ckick/compiler_flag.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(args = {}) ⇒ CompilerFlag
constructor
A new instance of CompilerFlag.
- #raw_flag ⇒ Object
- #to_hash_element ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ CompilerFlag
Returns a new instance of CompilerFlag.
10 11 12 13 14 15 16 |
# File 'lib/ckick/compiler_flag.rb', line 10 def initialize args={} raise IllegalInitializationError, "No flag provided to compiler flag" unless args.is_a?(Hash) && !args.empty? flag = args[:flag] || nil raise BadFlagError, "Bad flag content provided to compiler flag" unless flag.is_a?(String) && !flag.empty? @content = args[:flag] end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
8 9 10 |
# File 'lib/ckick/compiler_flag.rb', line 8 def content @content end |
Instance Method Details
#eql?(other) ⇒ Boolean
30 31 32 |
# File 'lib/ckick/compiler_flag.rb', line 30 def eql? other @content.eql? other.content end |
#hash ⇒ Object
34 35 36 |
# File 'lib/ckick/compiler_flag.rb', line 34 def hash @content.hash end |
#raw_flag ⇒ Object
26 27 28 |
# File 'lib/ckick/compiler_flag.rb', line 26 def raw_flag @content end |
#to_hash_element ⇒ Object
22 23 24 |
# File 'lib/ckick/compiler_flag.rb', line 22 def to_hash_element @content end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/ckick/compiler_flag.rb', line 18 def to_s @content end |