Class: Burke::IndividualGemSettings

Inherits:
Holder show all
Defined in:
lib/burke/tasks/gems.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Holder

[], #[], #[]=, #assert_field_exists!, #delete, field, field_exists?, #field_exists?, fields, #holder_instance_exec?, inherited, #merge, #merge!, #method_missing, #normalize_key, #to_hash

Constructor Details

#initialize(plaf) ⇒ IndividualGemSettings

Returns a new instance of IndividualGemSettings.



53
54
55
56
# File 'lib/burke/tasks/gems.rb', line 53

def initialize plaf
  super
  @platform = Gem::Platform.new plaf
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Burke::Holder

Instance Attribute Details

#platformObject (readonly)

Returns the value of attribute platform.



43
44
45
# File 'lib/burke/tasks/gems.rb', line 43

def platform
  @platform
end

Instance Method Details

#after_build(&block) ⇒ Object



67
68
69
70
# File 'lib/burke/tasks/gems.rb', line 67

def after_build &block
  @after = block if block_given?
  @after
end

#before_build(&block) ⇒ Object



62
63
64
65
# File 'lib/burke/tasks/gems.rb', line 62

def before_build &block
  @before = block if block_given?
  @before
end

#task_nameObject



58
59
60
# File 'lib/burke/tasks/gems.rb', line 58

def task_name
  "gem:#{platform}"
end