Class: MotionBlender::Require
- Inherits:
-
Object
- Object
- MotionBlender::Require
- Includes:
- ActiveSupport::Callbacks
- Defined in:
- lib/motion_blender/require.rb
Instance Attribute Summary collapse
-
#arg ⇒ Object
readonly
Returns the value of attribute arg.
-
#autoload_const_name ⇒ Object
Returns the value of attribute autoload_const_name.
-
#file ⇒ Object
Returns the value of attribute file.
-
#loader ⇒ Object
readonly
Returns the value of attribute loader.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#trace ⇒ Object
Returns the value of attribute trace.
Instance Method Summary collapse
- #autoload? ⇒ Boolean
-
#initialize(loader, method, arg) ⇒ Require
constructor
A new instance of Require.
- #match?(arg_or_file) ⇒ Boolean
Constructor Details
#initialize(loader, method, arg) ⇒ Require
Returns a new instance of Require.
12 13 14 15 16 |
# File 'lib/motion_blender/require.rb', line 12 def initialize loader, method, arg @loader = loader @method = method @arg = arg end |
Instance Attribute Details
#arg ⇒ Object (readonly)
Returns the value of attribute arg.
9 10 11 |
# File 'lib/motion_blender/require.rb', line 9 def arg @arg end |
#autoload_const_name ⇒ Object
Returns the value of attribute autoload_const_name.
10 11 12 |
# File 'lib/motion_blender/require.rb', line 10 def autoload_const_name @autoload_const_name end |
#file ⇒ Object
Returns the value of attribute file.
10 11 12 |
# File 'lib/motion_blender/require.rb', line 10 def file @file end |
#loader ⇒ Object (readonly)
Returns the value of attribute loader.
9 10 11 |
# File 'lib/motion_blender/require.rb', line 9 def loader @loader end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
9 10 11 |
# File 'lib/motion_blender/require.rb', line 9 def method @method end |
#trace ⇒ Object
Returns the value of attribute trace.
10 11 12 |
# File 'lib/motion_blender/require.rb', line 10 def trace @trace end |
Instance Method Details
#autoload? ⇒ Boolean
22 23 24 |
# File 'lib/motion_blender/require.rb', line 22 def autoload? method == :autoload end |
#match?(arg_or_file) ⇒ Boolean
18 19 20 |
# File 'lib/motion_blender/require.rb', line 18 def match? arg_or_file [arg, file].compact.include?(arg_or_file) end |