Class: Rys::Patch

Inherits:
Object
  • Object
show all
Defined in:
lib/rys/patcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass, &block) ⇒ Patch


176
177
178
179
180
181
182
# File 'lib/rys/patcher.rb', line 176

def initialize(klass, &block)
  @klass = klass

  dsl = Rys::PatcherDSL.new
  dsl.instance_eval(&block)
  @result = dsl._result
end

Instance Attribute Details

#klassObject (readonly)

Returns the value of attribute klass


174
175
176
# File 'lib/rys/patcher.rb', line 174

def klass
  @klass
end

#resultObject (readonly)

Returns the value of attribute result


174
175
176
# File 'lib/rys/patcher.rb', line 174

def result
  @result
end

Instance Method Details

#apply_ifObject


192
193
194
# File 'lib/rys/patcher.rb', line 192

def apply_if
  result[:apply_if]
end

#apply_only_onceObject


188
189
190
# File 'lib/rys/patcher.rb', line 188

def apply_only_once
  result[:apply_only_once]
end

#class_methodsObject


204
205
206
# File 'lib/rys/patcher.rb', line 204

def class_methods
  result[:class_methods]
end

#includedsObject


196
197
198
# File 'lib/rys/patcher.rb', line 196

def includeds
  result[:includeds]
end

#instance_methodsObject


200
201
202
# File 'lib/rys/patcher.rb', line 200

def instance_methods
  result[:instance_methods]
end

#whereObject


184
185
186
# File 'lib/rys/patcher.rb', line 184

def where
  result[:where]
end