Class: Buildozer::Dsl::Fragment
- Inherits:
-
Object
- Object
- Buildozer::Dsl::Fragment
- Defined in:
- lib/buildozer/dsl/fragment.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#name_to_key(name) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/buildozer/dsl/fragment.rb', line 10 def name_to_key(name) name = name.to_s # Remove first char of instance name, i.e. the @ sign return name.slice(1, name.length).to_sym end |
#options ⇒ Object
4 5 6 |
# File 'lib/buildozer/dsl/fragment.rb', line 4 def () return Hash[instance_variables.map { |name| [name_to_key(name), instance_variable_get(name)] } ] end |